[CLOSED] JSON to Excel?

  1. #1

    [CLOSED] JSON to Excel?

    Hello,

    Would like to know if anyone has found a method to easily convert JSON to an excel format such as CSV?

    Would be great if anyone has any suggestions.

    Cheers,
    Timothy
    Last edited by geoffrey.mcgill; May 06, 2011 at 6:20 PM. Reason: [CLOSED]
  2. #2

    RE: JSON to Excel?

    Hi Timothy,

    My first thought was to first convert the Json to XML, so I searched around for some information. The first result was demonstrating how to convert Json to an XmlDocument using Json.NET... which is already included with the Coolite Toolkit, see*http://james.newtonking.com/archive/...-released.aspx


    I only had time reproduce the test that was posted in the article, but it certainly looks promising.


    Once into Xml, it should be a relatively straightforward task to convert the document into an Excel compatible format. Either using XSLT, or I'm sure there are XML to Excel converter scripts/libraries available.*


    Hope this helps.


    Geoffrey McGill
    Founder
  3. #3

    RE: JSON to Excel?

    Apparently you're not the only one interested in this topic, see*http://extjs.com/forum/showthread.php?t=32400

    Geoffrey McGill
    Founder
  4. #4

    RE: JSON to Excel?

    Just wanted to update and post to the examples, looks like you handled this through XSLT on the following example Geoffrey, nice clean and efficient solution:

    https://examples1.ext.net/#/GridPane...ort_Data_Ajax/

    Hope it helps someone else.

    Cheers,
    Timothy
  5. #5
    Hi!

    I'm using the same ajax method from the examples to export data from a grid. the store is a json reader. the only problem is that after exporting, in the resulted file, i get an extra column with json reader's idproperty for header. the data inside has no meaning to me (-17,-2,...).
    How could i get rid of it ?

    Thanks!
  6. #6
    @maephisto - Would be best to start a new thread.
    Geoffrey McGill
    Founder
  7. #7
    Timothy,

    Adding to Geoffrey's suggestion (get to XML somehow and then some existing options are open to you), a little while back I added an example that modified the Ext.Net Examples whereby it posted the JSON data to an ashx instead of as a post back, returning the Excel. That might be an option for you?

    http://forums.ext.net/showthread.php...o-another-page

    If you have a different JSON format, you could deserialize it accordingly in the ashx, and serialize that to another XML format (maybe a bit expensive to deserialize and serialize and then do a transform, but you can cache the compiled xslt into the Cache which will help).

    Or deserialize the JSON to a C# object and you have lots of other options open to you too...

    Hope that helps?
  8. #8

    Excel json conversion

    Here are some example excel downloads with json excel connversion capabilities.

    http://ramblings.mcpher.com/Home/excelquirks/json

Similar Threads

  1. Export to Excel
    By ChrisO in forum 2.x Help
    Replies: 1
    Last Post: Jun 21, 2012, 4:08 PM
  2. [CLOSED] Import Excel into Grid
    By mcfromero in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Mar 13, 2012, 2:22 PM
  3. [CLOSED] Excel exporting issue
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Oct 20, 2010, 5:12 PM
  4. [CLOSED] Excel Export
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 25, 2009, 3:50 AM
  5. [CLOSED] Excel export
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 24, 2009, 5:35 AM

Posting Permissions