+ Reply to Thread
Results 1 to 9 of 9

How to get JSON textview from a normal URL

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    How to get JSON textview from a normal URL

    Hi, this post is related to the post below:
    https://www.excelforum.com/excel-pro...e-table-2.html

    I am trying to understand how to get the JSON textview from a URL? Is there a tool that I need to use to retrieve the information from any URL or is it simply to add something at the end of any URL?

    I spent few hours researching on this but had no luck so far.

    Any idea?

    Thanks.

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

    Re: How to get JSON textview from a normal URL


    Hi !

    Many samples on forums ! Like using VBA text functions (Split for example), via the ScriptControl object, via an add-in, …

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to get JSON textview from a normal URL

    If the response is in JSON format, you need to parse it. VBA does not have a native JSON parser, so you could use third parties API.

    https://github.com/VBA-tools/VBA-JSON

    This below link might also help you

    https://stackoverflow.com/questions/...rnal-libraries

  4. #4
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: How to get JSON textview from a normal URL

    Hi Marc, Thank you for the tip. Unfortunately your answer still confuse me as I am still quite new to VBA and JSON. What I am trying to find is a method to get JSON script (textview) from a URL so I can use it to scrape data I want. Thanks.

  5. #5
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: How to get JSON textview from a normal URL

    Hi AB33, Thanks the the link. I found it really useful. But how can I find the JSON script or JSON URL from any random website? Is the data available on the browser somewhere or do I need to use a tool to extract the JSON file from a website? Sorry, I am very new to this and I am trying to learn so I can apply the method to my project. Thank you.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: How to get JSON textview from a normal URL

    See if this helps
    Please Login or Register  to view this content.

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

    Re: How to get JSON textview from a normal URL

    It's Not available for any site. It depends how the site is built. Different sites use different methods of populating the html. The site in the question uses an api to populate the table, you use developer tools in the browser to inspect the network requests filtered to xhr requests, then work through each one to see whether the data you want is in there.

    Extracting data from websites is not a one size fits all, the method and code will be different for every site. To do it properly you need to understand a bit about web development and how sites are constructed

  8. #8
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: How to get JSON textview from a normal URL

    Thank you Jindon. Kyle123 has already provided the answer for my previous post which works perfectly well. And your code does the same work. Much appreciated.

  9. #9
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: How to get JSON textview from a normal URL

    Hi Kyle123, after hours of researching online, I could have a better understanding of how JSON are used on the web development. Thank you for the clarification.

+ 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. Replies: 14
    Last Post: 11-19-2019, 09:17 AM
  2. [SOLVED] Trouble with VBA-JSON
    By stusic in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-07-2017, 06:48 AM
  3. [SOLVED] Project(Normal) vs TemplateProject(Normal)
    By jomili in forum Word Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2017, 09:16 AM
  4. ways to determine a normal or log normal distribution in excel
    By aprildu in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-29-2016, 06:32 PM
  5. Excel VBA-JSON Example
    By manofcheese in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2016, 11:52 AM
  6. Json to Excel Conversion
    By shrikant_chandurkar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-19-2015, 03:50 AM
  7. API Json to Excel Macro
    By ermengard in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2014, 05:33 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