1. #1
    Ext User
    Join Date
    Sep 2008
    Posts
    4
    Vote Rating
    0
    sree is on a distinguished road

      0  

    Default Export to Excel File Name

    Export to Excel File Name


    Hi,

    I am using ext-2.2. I am able to export data from my grid to excel, but if i save that excel file, that file name is taking random characters. for eg: 'feop9bnd'. Now i want to set meaningful filename. How can i do that?

    Thanks

  2. #2

  3. #3
    Ext User
    Join Date
    Sep 2008
    Posts
    4
    Vote Rating
    0
    sree is on a distinguished road

      0  

    Default Export to Excel File Name

    Export to Excel File Name


    Hi

    Below is my code in js , this is working fine

    buttons: [{
    id: 'grid-excel-button',
    text: 'Export to Excel...',
    iconCls: 'excel',
    handler: function(){
    document.location='data:application/vnd.ms-excel;base64,' +
    Base64.encode(gridX.getExcelXml());
    }
    }]

    how should and where should i keep the below code to specify meaningful excel name

    Content-Disposition:attachment;filename=export_filename.xls

    Thanks
    sree

  4. #4
    Sencha User emredagli's Avatar
    Join Date
    Jun 2008
    Posts
    301
    Vote Rating
    2
    emredagli is on a distinguished road

      0  

    Default


    I have the same problem.
    And I also couldn't manage this.

    Thanks.

Thread Participants: 2