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,556
    Vote Rating
    1272
      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! Checkout the CODE tag!

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

  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,556
    Vote Rating
    1272
      0  

    Default

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

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

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
  •