+ Reply to Thread
Results 1 to 7 of 7

seperate json file into different columns by key

  1. #1
    Registered User
    Join Date
    10-20-2017
    Location
    Seattle
    MS-Off Ver
    Office 2007
    Posts
    8

    seperate json file into different columns by key

    I have a series of gene id json files setup inside of a single excel cell.

    Each cell is setup with 5 key:value pairs
    Lets say they are Dog, Cow, Whale, Cat and Snake

    Within one cell [{"Name":"Canus Bitus","Leg Number":"4","Lung Number":"1","LengthinFeet":"2.5","Poisonious":"no"},{"Name":"Moo Milker","Leg Number":"4", "Lung number":"4",etc...},{whale},{cat},{snake}]

    How can I take that string and turn each key:value into a column? {dog}col1 {cow}col2 {whale}col3 {cat}col4 {snake}col5

    Yes... this should be done in python but nothing is documented so I am creating the process 'as is' in excel, then upgrading to a tool designed for this century.

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: seperate json file into different columns by key

    This works with the limited data you supplied
    - with data is in column A
    - results in B:F
    - test in attached workbook with {CTRL}K
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: seperate json file into different columns by key

    check https://github.com/VBA-tools/VBA-JSON
    also, not sure, given that you are python user, why not use python and just output the result in excel (if you must). Probably you have seen the link to python forum in your other thread
    If you are pleased with a member's answer then use the Star icon to rate it.

  4. #4
    Registered User
    Join Date
    10-20-2017
    Location
    Seattle
    MS-Off Ver
    Office 2007
    Posts
    8

    Re: seperate json file into different columns by key

    Because I am relatively new to python and sewing together modules of package code is fun, but its a different process and mindset than data munging.

    Which is code for 'I am polished but still a newbie'

    @kev_ is that python or c, or vba?

  5. #5
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: seperate json file into different columns by key

    Hi excelmymind
    It is VBA

  6. #6
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: seperate json file into different columns by key

    Quote Originally Posted by excelmymind View Post
    Because I am relatively new to python and sewing together modules of package code is fun, but its a different process and mindset than data munging.

    Which is code for 'I am polished but still a newbie'
    It's definitely your decision, but for me it sounds like "double work", which is polite way to say "wasting your time unnecessary to do the same thing twice" :-). More over python is more versatile and suitable for this kind of work. Even if you spend the same time, it will be well worth it as you will learn/polish new skills and knowledge.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,341

    Re: seperate json file into different columns by key

    Thread moved to VBA section.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. [SOLVED] Seperate First, Middle and Last name to seperate columns
    By Accusoft in forum Excel General
    Replies: 4
    Last Post: 04-05-2014, 04:51 AM
  2. Json file from URL to Excel
    By KK33317 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-21-2014, 10:50 AM
  3. Json file from URL to Excel
    By KK33317 in forum Tips and Tutorials
    Replies: 0
    Last Post: 03-13-2014, 07:39 AM
  4. [SOLVED] Seperate inches into 2 seperate columns
    By RTech in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-08-2013, 11:42 AM
  5. JSON URL to xls in rows and columns
    By kvsree in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2013, 12:02 PM
  6. [SOLVED] Macro to seperate worksheets to seperate workbooks fired from external excel file
    By optionone in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-26-2012, 01:25 PM
  7. Replies: 0
    Last Post: 04-23-2012, 04:27 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