X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Pman.Gnumeric.js;h=a346fba734682380cd2b22c54273ea66c514bbf0;hb=refs%2Fheads%2Fmaster;hp=eb0675b58d5d991b6789d418022fb5de9aad9a8c;hpb=acd86626b8db386ca9fc3b1dbd1a4b819afeaf5b;p=Pman.Core diff --git a/Pman.Gnumeric.js b/Pman.Gnumeric.js index eb0675b5..a346fba7 100644 --- a/Pman.Gnumeric.js +++ b/Pman.Gnumeric.js @@ -148,6 +148,13 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, { rowOffset : 0, + /** + * @type {String} format - either XLSX (if images are used) or XLS - as ssconvert does not do images that well. + */ + + format : 'xlsx', + + /** * load: * run the connection, parse document and fire load event.. @@ -211,7 +218,7 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, { // we wil only support AA not AAA var top = Math.floor(c/26); var bot = c % 26; - var cc = top > 0 ? String.fromCharCode('A'.charCodeAt(0) + top) : ''; + var cc = top > 0 ? String.fromCharCode('A'.charCodeAt(0) + (top-1)) : ''; cc += String.fromCharCode('A'.charCodeAt(0) + bot); return cc+'' +r; @@ -1709,28 +1716,28 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, { } var ser = new XMLSerializer(); - Roo.get(document.body).mask("Downloading"); + Roo.get(document.body).mask("Downloading"); var x = new Pman.Download({ method: 'POST', - timeout : 120000, // quite a long wait.. 2 minutes. + timeout :240000, // quite a long wait.. 2 minutes. params : { xml : ser.serializeToString(this.doc), - format : 'xlsx', //xml + format : this.format, debug : 0 }, url : (this.downloadURL || (baseURL + '/GnumericToExcel/')) + name + '.xls', success : function() { - Roo.get(document.body).unmask(); + Roo.get(document.body).unmask(); Roo.MessageBox.alert("Alert", "File should have downloaded now"); if (callback) { callback(); } }, - failure : function() { - Roo.get(document.body).unmask(); - Roo.MessageBox.alert("Alert", "Download failed"); - } + failure : function() { + Roo.get(document.body).unmask(); + Roo.MessageBox.alert("Alert", "Download failed"); + } }); }