+ Reply to Thread
Results 1 to 4 of 4

Json file from URL to Excel

  1. #1
    Registered User
    Join Date
    03-09-2014
    Location
    Florida
    MS-Off Ver
    Excel 2013
    Posts
    14

    Json file from URL to Excel

    My original intent was to try and use this file, but opted to try for the webpage instead. Am able to get the webpage to Excel now, but I can't get the complete page, so I am back to thinking the Json is the way to go.

    I copied and pasted Kyle123's code for the PGA leaderboard, it works perfect until I tried to modify it to the page I want. I only need five columns, but kept the twelve in Kyle123's example for the sake of seeing if I could make it work. Right now I am getting a subscript out of range error.

    I want to name the sheet Zip77477 and the five parts I need are "podList", "name", "desc", "summary", "expiration".
    If I need to keep other data in the sheet to make it work properly, that is fine as well.
    This is the code and my modifications, any help is greatly appreciated.
    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    03-09-2014
    Location
    Florida
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Json file from URL to Excel

    I have tried to modify the code in Kyle123's example to work for the json I am trying to retrieve. I am getting a getting a "subscript out of range" error, can anyone help me find out why? Thanks
    Please Login or Register  to view this content.

  3. #3
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Json file from URL to Excel

    You aren't a million miles away, like this:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-09-2014
    Location
    Florida
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Json file from URL to Excel

    Thank you, this script works perfect, however I have one more question.

    I would like to do multiple sheets in one workbook, each sheet representing a different zipcode.
    The only two lines that change within the script are the URL
    Please Login or Register  to view this content.
    and what sheet
    Please Login or Register  to view this content.
    I have each sheet with a corresponding module. When I run the macros for the new sheet(33317) it returns the data from 77477. What do I need to do so that each module with each zipcode returns different data?

+ 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. Import JSON Api to Excel
    By hockeyadc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-13-2014, 01:42 PM
  2. Excel VBA - CURL - PUT - JSON - WinHttpRequest
    By asipoy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-24-2013, 06:53 AM
  3. Import JSON in Excel by macro
    By bmmerkx in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-28-2013, 09:39 AM
  4. Importing JSON Data into Excel
    By Kyle123 in forum Excel Tips
    Replies: 1
    Last Post: 07-25-2012, 08:47 AM
  5. 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