1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    5
    Vote Rating
    0
    testowy is on a distinguished road

      0  

    Default 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.

  2. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,111
    Answers
    83
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    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

  3. #3
    Sencha User
    Join Date
    Nov 2012
    Posts
    5
    Vote Rating
    0
    testowy is on a distinguished road

      0  

    Default


    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?

  4. #4
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,111
    Answers
    83
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    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.

  5. #5
    Sencha User
    Join Date
    Nov 2012
    Posts
    5
    Vote Rating
    0
    testowy is on a distinguished road

      0  

    Default


    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:
    Spreadsheets MS Excel application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
    Open Office sheet application/x-vnd.oasis.opendocument.spreadsheet
    PDF application/pdf
    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?

  6. #6
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,111
    Answers
    83
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    There is no Excel reader. You must write it yourself I think.

  7. #7
    Sencha User
    Join Date
    Nov 2012
    Posts
    5
    Vote Rating
    0
    testowy is on a distinguished road

      0  

    Default


    Thank you very much for all answers.

  8. #8
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,111
    Answers
    83
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    You can google a bit, Excel can be read with ActiveX in javascript.

    Something like

    Code:
    var excel=new ActiveXObject("Excel.Application");
    but then the client must have this stuff installed

  9. #9
    Sencha User
    Join Date
    Nov 2012
    Posts
    5
    Vote Rating
    0
    testowy is on a distinguished road

      0  

    Default


    Quote Originally Posted by tvanzoelen View Post
    but then the client must have this stuff installed
    It's not good solution for me. I found it today.

Thread Participants: 1