+ Reply to Thread
Results 1 to 6 of 6

Convert json to csv

  1. #1
    Registered User
    Join Date
    04-28-2012
    Location
    Yorkshire England
    MS-Off Ver
    Excel for MS 365 v2111
    Posts
    17

    Convert json to csv

    Not sure whether this is something that I should be asking you to advise on so please don't hesitate to tell me to go forth and multiply!!!

    Anyway, here goes. I have extracted a load of electricity consumption stats via API and produced a response that is json. The data consists of half-hourly timestamps in Unix format together with the usage. Eg [1646092800, 0.122], [1646094600, 0.089]

    How should I proceed to enter this data into an Excel spreadsheet to show the timestamps in one column and the kWh in another? There are approximately 200 separate entries. I am able to do the timestamp conversion but I cannot see how to extract the json file's data into csv.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,364

    Re: Convert json to csv

    Please see the yellow banner at top of page on how post a sample file

    This might help ...

    https://data.page/json/csv
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Convert json to csv


    Quote Originally Posted by hartwith View Post
    how to extract the json file's data into csv.
    Just follow the top page yellow banner in order to attach your source json file and accordingly the exact expected result csv text file
    with your best accurate elaboration in order there is nothing to guess (folder, time conversion algorithm, …).
    Last edited by Marc L; 04-05-2022 at 07:03 PM.

  4. #4
    Registered User
    Join Date
    04-28-2012
    Location
    Yorkshire England
    MS-Off Ver
    Excel for MS 365 v2111
    Posts
    17

    Re: Convert json to csv

    Unfortunately my json file has been rejected as an Invalid File but I will try to follow the content of John Topley's link. Onwards & Upwards as they say!

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Convert json to csv


    Try to add the extension .txt to your source json file or link both files on a files host website like Dropbox …

  6. #6
    Registered User
    Join Date
    04-28-2012
    Location
    Yorkshire England
    MS-Off Ver
    Excel for MS 365 v2111
    Posts
    17

    Re: Convert json to csv

    Hello
    Please ignore my earlier reply of this morning.
    John Topley...your link works perfectly. All I need to do now is to so convert the timestamp from Unix to summat useful and play around with the KwH figures but that I can do.

    Very Many thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Convert short VBA code to google sheet Json
    By tagazou in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2020, 07:44 AM
  2. Edit JSON parser code to add function to write JSON file
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-16-2020, 09:28 PM
  3. [SOLVED] Vba convert excel to json with additional text
    By chhiew in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2019, 10:14 PM
  4. Convert JSON Date to Excel Date
    By NeedForExcel in forum Excel General
    Replies: 6
    Last Post: 03-16-2018, 08:20 AM
  5. [SOLVED] Convert jscript JSON flattener to work with VBA ScriptControl
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2018, 11:49 AM
  6. [SOLVED] Trouble with VBA-JSON
    By stusic in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-07-2017, 06:48 AM
  7. Convert Object to JSON String
    By amartinez988 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-01-2016, 03:41 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1