The data is downloaded via a data uri. That's the "data:application/vnd.ms-excel;base64,PD94bWwgdm...." it should be prompting for a download. Which browser are you using?
The data is downloaded via a data uri. That's the "data:application/vnd.ms-excel;base64,PD94bWwgdm...." it should be prompting for a download. Which browser are you using?
If you mean me, I'm using firefox 5.0.
I do get prompted for at download, but for a .part file. It ends up being a xls.part.xls file. Like in the example, it contains something like this in the first cell:
Code:Exportable grid900050000falsefalse 0">Exportable gridCompanyPriceChange% ChangeLast UpdatedBlank132767600FalseFalse
mmm, no idea. It seems like something is going wrong in the generation of the file... no idea what, maybe a "strange" character that isn't being escaped?
What version of excel are you using? 2007?
It seems that all the information is present before the Base64 encoding, but using the xml without the encoding this produces an incorrect "sheet". So now I'm thinking that the xml format is wrong for my very old excel version (2003)...
Update: Seems I was using a very very old version of excel (2000!) and it worked as soon as I changed to excel 2003. So thanks for your replies wiznia![]()
Last edited by Ewoq; 20 Jul 2011 at 6:51 AM. Reason: Silly me
Great! I'm glad to help.
I'm using IE9 and get no prompt, is there possibly a browser setting that is preventing it?
To be clear it opens a new tab with the url set to the "data:application/vnd.ms-excel;base64,PD94bWwgdm..."
I haven't tested it on IE, until IE7 I think there was no support for data uri, but in IE8 and 9 there is... in theory it should work.
I include the Exporter.js file in the <header> tag <script type="text/javascript" src="./examples/ux/exporter/Exporter.js"></script> and put all other files under ext-4.0.2a\examples\ux\exporter and csvFormatter and excelFormatter sub-folders.
I also use:
Ext.Loader.setConfig({enabled: true});
Ext.Loader.setPath('Ext.ux', './examples/ux');
I add this config param in my Ext.grid.Panel object:
dockedItems: [
{
xtype: 'toolbar',
dock: 'bottom',
items: [ { xtype: 'exporterbutton'} ]
}
]
However, I still got the same error:
namespace is undefined
if (namespace === from...substring(0, from.length) === from) { ext-all-debug.js (line 3487)
This error is from ext-all-debug.js (line 3487) file.
Any idea?
mmm, which namespace is undefined? Are the files loading correctly?
You don't need to include the file in the head, just add it to the 'uses' config option.
Again I have a similar problem...
I can only get the exporter to work if I put it in a /src/ux/ folder in my ext directory. I do not want it there.
I have tried moving it to another folder and changing the Ext.Loader.setPath to this new folder, but can't get it to work at all. Is that even the right way to do it?
Any thoughts?