Results 1 to 4 of 4

Thread: Export Ext.Grid data in CSV (not Excel)

  1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    17
    Vote Rating
    0
      0  

    Default Export Ext.Grid data in CSV (not Excel)

    I am trying to export the Ext.grid data in the CSV format using Ext.ux.Exporter. Can somebody give me an example as to how I can achieve doing it successfully?

    I added the

    Code:
    <script src="../Exporter-all.js" type="text/javascript"></script>
    which I got from the Ed github.

    Code:
    var exportCSV = new Ext.ux.Exporter.Button({
                            component: grid,
                            text: 'Download CSV'
                        });
    Now I located the new source https://code.google.com/p/geoext-vie...r-all.js?r=557 but not sure why I keep getting,

    Heron is not defined

    in the console, in line 179. Any idea how I can resolve that?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,421
    Vote Rating
    1271
      0  

    Default

    Line 179 uses the heron namespace. Looks like you need to include other JS files.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    17
    Vote Rating
    0
      0  

    Default

    Thanks for the reply @mitchellsimoens. I was able to add,

    Code:
    <script src="../heron-0.70/lib/ext.ux/Exporter-all.js" type="text/javascript"></script>
    <script src="../heron-0.70/script/Heron.js" type="text/javascript"></script>
    
    
    And I can now download the data, but it is downloaded as text file not CSV. Where do I need the correction?

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,421
    Vote Rating
    1271
      0  

    Default

    You would have to ask the author about that
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •