+ Reply to Thread
Results 1 to 2 of 2

JSON object in CSV

  1. #1
    Registered User
    Join Date
    01-20-2016
    Location
    LOndon
    MS-Off Ver
    2010
    Posts
    27

    JSON object in CSV

    In one field in a CSV file is a JSON object that I wish to parse into Excel. The difficulty is that the JSON string sometimes might be longer than the 32K character limit for an Excel cell so if I import the CSV into an Excel sheet it will be incomplete.

    Is there any way to read the CSV directly into VBA, parse it, extract the JSON and parse that? If not, am I better to read the CSV file, extract the JSON object, save that to disc then re-import that directly into Excel?

    Worst case is using some sort of Powershell script but I'm trying to avoid any external processing.

    Thanks in advance!

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: JSON object in CSV

    It's possible to do I/O operations on a file.

    https://docs.microsoft.com/en-gb/off...open-statement
    https://docs.microsoft.com/en-us/off...inputstatement
    Cheers
    Andy
    www.andypope.info

+ 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. JSON Class Module - Object Error
    By kadams99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-11-2020, 12:27 PM
  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] Add key <> value pair to JSON object through scriptcontrol
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-28-2018, 12:26 AM
  4. Macro JSON file object extract
    By yousufj56 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-16-2017, 07:30 PM
  5. Convert Object to JSON String
    By amartinez988 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-01-2016, 03:41 PM
  6. Get all elements from a json object at once
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2015, 02:34 AM
  7. Is there a native way to encode an object as a JSON string?
    By XmisterIS in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-01-2014, 05:32 AM

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