Hybrid View

  1. #1
    Ext JS Premium Member
    Join Date
    Nov 2010
    Posts
    7
    Vote Rating
    0
    sri_dev is on a distinguished road

      0  

    Default 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

  2. #2
    Sencha - Community Support Team VinylFox's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,501
    Vote Rating
    8
    VinylFox will become famous soon enough VinylFox will become famous soon enough

      0  

    Default


    You always have the option to build the Excel file on the server and pass it to the user.

  3. #3
    Ext JS Premium Member
    Join Date
    Nov 2010
    Posts
    7
    Vote Rating
    0
    sri_dev is on a distinguished road

      0  

    Default


    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.

  4. #4
    Sencha - Community Support Team VinylFox's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,501
    Vote Rating
    8
    VinylFox will become famous soon enough VinylFox will become famous soon enough

      0  

    Default


    Do you realize that Ext JS is an entirely client side JavaScript library, and not a Java library like the one you mentioned?

  5. #5
    Ext JS Premium Member
    Join Date
    Nov 2010
    Posts
    7
    Vote Rating
    0
    sri_dev is on a distinguished road

      0  

    Default


    Anybody has a good solution to the export to excel from client side?
    ...much appreciated!

  6. #6
    Sencha User
    Join Date
    Aug 2010
    Posts
    45
    Vote Rating
    0
    daddie888 is on a distinguished road

      0  

    Default


    Hi, i use two methods, one is IE only (also v7) and uses ActiveX
    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;                                                                
        }
      }
    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.
    I use ; as separator but you might have to see what you need in your windows language and region settings.

    Success !

    Peter

Similar Threads

  1. Export Excel, please help
    By pietromenea in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 3 Aug 2010, 8:19 AM
  2. Export to Excel File Name
    By sree in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 22 Nov 2008, 12:07 AM
  3. export to Excel
    By FMIC_DEV in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 29 Jan 2008, 8:42 AM
  4. export excel
    By neenhouse in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 20 Dec 2007, 4:35 PM

Thread Participants: 3

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi