-
6 Nov 2012 3:14 AM #1
Unanswered: Load data to store from Excel File
Unanswered: Load data to store from Excel File
Hi,
I use Google Drive SDK to download excel file from GoogleDoc. Now, I would like to show this data use ExtJS component like Grid. Is possible to do that? Thx for anserws.
-
6 Nov 2012 4:19 AM #2Ext JS Premium Member
- Join Date
- Apr 2008
- Location
- Groningen - Netherlands
- Posts
- 1,017
- Vote Rating
- 23
- Answers
- 75
You could pass the data of the googe drive into an array an read it with the ArrayReader to display it in a grid.
Here an example of a basis ArrayGrid
http://docs.sencha.com/ext-js/4-1/#!...rray-grid.html
-
7 Nov 2012 12:16 AM #3
I think of this solution, but I don't have idea how can i pass this data from google drive. I can only download this file like odt,xls or pdf. So how can i export it to array?
-
7 Nov 2012 12:24 AM #4Ext JS Premium Member
- Join Date
- Apr 2008
- Location
- Groningen - Netherlands
- Posts
- 1,017
- Vote Rating
- 23
- Answers
- 75
Well you must manipulate the file with javascript. I don't know how google SDK returns it. But you must find a way to access it.
If the SDK has a SOAP protocol or it returns XML there are readers for it. So make an Ajax call lto the SDK read the response, transform the data and put it in a store for display in a grid.
-
7 Nov 2012 12:33 AM #5
I download Google Doc file in my application. Google SDK support this MIME Type for google doc file:
https://developers.google.com/drive/manage-downloads
In my case support MIME type:
I suppose ExtJS not support reader for Excel file? So i need transform this file using other library or pure JS and then load this file to array grid?Spreadsheets MS Excel application/vnd.openxmlformats-officedocument.spreadsheetml.sheet Open Office sheet application/x-vnd.oasis.opendocument.spreadsheet PDF application/pdf
-
7 Nov 2012 12:43 AM #6Ext JS Premium Member
- Join Date
- Apr 2008
- Location
- Groningen - Netherlands
- Posts
- 1,017
- Vote Rating
- 23
- Answers
- 75
There is no Excel reader. You must write it yourself I think.
-
7 Nov 2012 12:48 AM #7
-
7 Nov 2012 12:58 AM #8Ext JS Premium Member
- Join Date
- Apr 2008
- Location
- Groningen - Netherlands
- Posts
- 1,017
- Vote Rating
- 23
- Answers
- 75
You can google a bit, Excel can be read with ActiveX in javascript.
Something like
but then the client must have this stuff installedCode:var excel=new ActiveXObject("Excel.Application");
-
7 Nov 2012 2:12 AM #9


Reply With Quote