-
22 Nov 2010 10:59 AM #1
Urgent: Export to Excel - IE7
Urgent: Export to Excel - IE7
Hi
We have IE7 as a corporate standard. We are evaluating ExtJS and found it does not have an export from grid to Excel feature. Especially googling has resulted in no good examples for exporting a grid in IE7.
This is urgent and is a make or break for going ahead with ExtJS.
Can some one please help out with specific code/example/plugin? (and please no FF or IE8 examples)
thanks
Sri
-
22 Nov 2010 11:19 AM #2
You always have the option to build the Excel file on the server and pass it to the user.
-Shea
My Blog:VinylFox | Twitter:@VinylFox | JavaScript Magazine:JSMag | Curator of the Baltimore/DC JavaScript Meetup | Author: Learning ExtJS 3.x Book
ExtJS Extensions & Plugins: GMapPanel UX | HtmlEditor Buttons Plugin | Selection Enabler Plugin | Grid DataDrop Plugin | Additional Ext.Fx
Sencha Touch Plugins: Swipe Tabs | List Pull Refresh | Accelerometer Tabs
-
22 Nov 2010 11:41 AM #3
We do not want to go for another library to do just the export - we are currently using a table library(displaytag) that already has this feature. We are trying to migrate to ExtJS since we like some of the other grid features it provides. Also we are planning to use the client side filtering that saki has written - so a client side export will be great but not necessary.
-
22 Nov 2010 12:48 PM #4
Do you realize that Ext JS is an entirely client side JavaScript library, and not a Java library like the one you mentioned?
-Shea
My Blog:VinylFox | Twitter:@VinylFox | JavaScript Magazine:JSMag | Curator of the Baltimore/DC JavaScript Meetup | Author: Learning ExtJS 3.x Book
ExtJS Extensions & Plugins: GMapPanel UX | HtmlEditor Buttons Plugin | Selection Enabler Plugin | Grid DataDrop Plugin | Additional Ext.Fx
Sencha Touch Plugins: Swipe Tabs | List Pull Refresh | Accelerometer Tabs
-
22 Nov 2010 9:51 PM #5
Anybody has a good solution to the export to excel from client side?
...much appreciated!
-
23 Nov 2010 2:21 AM #6
Hi, i use two methods, one is IE only (also v7) and uses ActiveX
The other one is making a CSV textfile and then opening that with Excel. Use .csv as extension and Exel knows what to do with it.Code:function toExcel(grid){ if (window.ActiveXObject){ var xlApp = new ActiveXObject("Excel.Application"); xlApp.Visible = true; var xlBook = xlApp.Workbooks.Add(); xlBook.worksheets(1).activate; var XlSheet = xlBook.activeSheet; xlApp.visible = true; var xlRow = 1; var xlCol = 1; var store = grid.getStore(); for (xlCol=1;xlCol<store.fields.length+1;xlCol++){ var veld = store.fields.itemAt(xlCol-1).name; XlSheet.cells(xlRow, xlCol).value = veld; } xlRow = 2; store.each(function(record) { for (xlCol=1;xlCol<record.fields.length+1;xlCol++){ var veld = store.fields.itemAt(xlCol-1).name; XlSheet.cells(xlRow, xlCol).value = record.get(veld); } xlRow++; }); XlSheet.columns.autofit; } }
I use ; as separator but you might have to see what you need in your windows language and region settings.
Success !
Peter
-
23 Nov 2010 4:26 AM #7
Hi,
for only serversided excel-creation i used successfully this script:
https://github.com/edspencer/Ext.ux.Exporter
works great for me, hope for you, too.
regards,
tk
-
23 Nov 2010 7:46 AM #8
This user asked for IE7 support. The Exporter UX uses data url's, which are not supported by IE7.
-Shea
My Blog:VinylFox | Twitter:@VinylFox | JavaScript Magazine:JSMag | Curator of the Baltimore/DC JavaScript Meetup | Author: Learning ExtJS 3.x Book
ExtJS Extensions & Plugins: GMapPanel UX | HtmlEditor Buttons Plugin | Selection Enabler Plugin | Grid DataDrop Plugin | Additional Ext.Fx
Sencha Touch Plugins: Swipe Tabs | List Pull Refresh | Accelerometer Tabs
-
23 Nov 2010 8:29 AM #9
oh i see... sorry have not read right...

another idea we allready used is to fake an excel-file... it's realy a bad workaround, but it does what it should... you can create a csv-file. but instead of ';' or ',' you use '<tab>' to separate the fields. then you can name the file *.xls and excel will work fine with it...
for sure, you cant format anything and its realy NO excel-native. but for our customer the circumstance that is is called xls and behaves like one was enough, maybe it's for yours, too!?
regards,
tk
-
23 Nov 2010 9:46 AM #10
Thanks Peter - Excellent - I like the ActiveX option - but will have to discuss with larger team since people need to change their IE settings to be able to allow it to run.
Do you have the sample code for the CSV file?
Similar Threads
-
Export Excel, please help
By pietromenea in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 3 Aug 2010, 8:19 AM -
Export to Excel File Name
By sree in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 22 Nov 2008, 12:07 AM -
export to Excel
By FMIC_DEV in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 29 Jan 2008, 8:42 AM -
export excel
By neenhouse in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 20 Dec 2007, 4:35 PM


Reply With Quote
