I found a plugin that helps me export ExtJS grid data into MS Excel sheet.
<a href="http://druckit.wordpress.com/2013/10/26/generate-an-excel-file-from-an-ext-js-4-grid/" rel="nofollow noreferrer">http://druckit.wordpress.com/2013/10/26/generate-an-excel-file-from-an-ext-js-4-grid/</a>
all works great except for the error I'm getting before opening the file.
<img src=" " alt="enter image description here">
Peace of my code:
One solution suggested that i remove the apostrophe so i tried:
But no luck. Any idea?
<a href="http://druckit.wordpress.com/2013/10/26/generate-an-excel-file-from-an-ext-js-4-grid/" rel="nofollow noreferrer">http://druckit.wordpress.com/2013/10/26/generate-an-excel-file-from-an-ext-js-4-grid/</a>
all works great except for the error I'm getting before opening the file.
<img src=" " alt="enter image description here">
Peace of my code:
Code:
if (Ext.isChrome || Ext.isGecko) { // local download
var gridEl = this.getEl();
var el = Ext.DomHelper.append(gridEl, {
tag: "a",
download: title + "-" + Ext.Date.format(new Date(), 'Y-m-d') + '.xls',
href: location
});
el.click();
Ext.fly(el).destroy();
}
One solution suggested that i remove the apostrophe so i tried:
Code:
download: title + "-" + Ext.Date.format(new Date(), "Y-m-d") + ".xls",
But no luck. Any idea?