1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    242
    Vote Rating
    7
    ypandey will become famous soon enough

      2  

    Default Updated Ext.ux.Exporter for Ext JS 4.x + 5.x

    Updated Ext.ux.Exporter for Ext JS 4.x + 5.x


    To export data from store-based component (grid, tree,..etc) to any format document (csv, excel, ...etc)

    Features:
    • Save Files on the client-side with the given file name using Blob (Supported by all latest browsers: IE 10+, Chrome, FF, Safari)
    • Otherwise open document in a new window or download remotely with server (For older browsers IE 8,9)
    • Special Case: to extract value from renderers returing HTML string
    • With fixes in Excel Formatter
    • fires "start" and "complete" events before and after file save
    Demo: https://fiddle.sencha.com/#fiddle/ikd

    Github: https://github.com/yogeshpandey009/Ext.ux.Exporter/

    U
    pdate: changed fiddle from 6st to ikd

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    5,350
    Vote Rating
    113
    Gary Schlosberg is just really nice Gary Schlosberg is just really nice Gary Schlosberg is just really nice Gary Schlosberg is just really nice Gary Schlosberg is just really nice

      0  

    Default


    Nice! Thanks for sharing your labors with the community.
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our human resources manager: fabienne.bell@sencha.com

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    242
    Vote Rating
    7
    ypandey will become famous soon enough

      0  

    Arrow


    @Gary

    Note: If fiddle not working, please change the sequence of files in the following order.
    1. FileSaver.js
    2. Formatter.js
    3. csvFormatter/*.js
    4. excelFormatter/*.js
    5. Exporter.js
    6. ExporterButton.js

  4. #4
    Sencha User
    Join Date
    Aug 2014
    Posts
    27
    Vote Rating
    0
    Richardmansfield is on a distinguished road

      0  

    Default


    Hi! ypandey whether the Ext.ux.Exporter is available for the Ext Js 5.x version if so, please share it here as I am searching hardly the updated plugin for the ExtJs5 version please.

  5. #5
    Sencha User
    Join Date
    Dec 2011
    Posts
    242
    Vote Rating
    7
    ypandey will become famous soon enough

      1  

    Thumbs up


    Hi Richardmansfield,


    I made couple of small changes and same fiddle works for Ext JS 5.x
    1. removed addEvents in ExporterButton class, as it has been deprecated
    2. used Ext.Util.Format.usMoney function instead of "usMoney" string in renderer
    Feel free to revert back here. I would be happy to help.

  6. #6
    Sencha Premium Member
    Join Date
    Aug 2014
    Posts
    25
    Vote Rating
    1
    Soringpenguin is on a distinguished road

      1  

    Default


    I want to use this to export to xlsx format. Is this possible? Also the save as xls doesnt work in fiddle for me.

  7. #7
    Sencha User
    Join Date
    Jun 2007
    Location
    Bourges (France)
    Posts
    102
    Vote Rating
    1
    Footeuz is on a distinguished road

      0  

    Default


    Hi,
    I use the code :

    Code:
    Ext.Loader.setConfig({
        enabled: true,
        disableCaching: false,
        paths: {
            'Ext.ux.exporter': 'ext/packages/ext-ux/Exporter'
        }
    });
    Ext.require([
        Ext.ux.exporter.Exporter
    ]);
    to include the library.
    But I receive the error message :
    TypeError: Ext.ux.exporter is undefined
    Ext.ux.exporter.Exporter

    The path of what I've downloaded is ext/packages/ext-ux/Exporter/ so I don't understand...

    PS : I use the 5.1.0 version of ExtJs

  8. #8
    Sencha User
    Join Date
    Dec 2011
    Posts
    242
    Vote Rating
    7
    ypandey will become famous soon enough

      1  

    Default


    Quote Originally Posted by Soringpenguin View Post
    I want to use this to export to xlsx format. Is this possible? Also the save as xls doesnt work in fiddle for me.
    Hi Soringpenguin,

    https://fiddle.sencha.com/#fiddle/ikd

    I have done minimum changes to make it work on 5.0.1, I have not tested on various scenarios. So feel free to fork the fiddle and notify the changes here!

    Hi Footeuz,

    Use source code from this fiddle instead, but currently you are facing issue in loading required JS files. Use network log to identify current path.



    Thanks
    Yogesh

  9. #9
    Sencha User
    Join Date
    Jun 2007
    Location
    Bourges (France)
    Posts
    102
    Vote Rating
    1
    Footeuz is on a distinguished road

      0  

    Default


    Thanks.
    In fact I didn't put the config code in the right file.
    You have to put it in app.js and not in the view.
    It works fine now.

    Is there a solution to change the column head title in excel file ?
    Because I only have the Model store fields name.

  10. #10
    Sencha User
    Join Date
    Jun 2007
    Location
    Bourges (France)
    Posts
    102
    Vote Rating
    1
    Footeuz is on a distinguished road

      0  

    Default


    The exporter doesn't work with IE9
    My clients only have IE
    Did someone allready have this problem ?