2

I need to copy entire website (in chrome) and put it in a specific place in excel using VBA. I'm trying to create a distance matrix so I work with files looking as this example:

{
"destination_addresses" : [  
  "Bratislava, Slovak republic"
   ],
   "origin_addresses" : [
      "Vienna, Austria"
   ],
   "rows" : [
      {
         "elements" : [
            {
               "distance" : {
                  "text" : "79,1 km",
                  "value" : 79100
               },
               "duration" : {
                  "text" : "0 hours, 54 minutes",
                  "value" : 3240
               },
               "status" : "OK"
            }               
         ]
      }
   ],
   "status" : "OK"
}

After copying web content I can extract only distance and duration and insert it in a table.

2
  • Take a look here: stackoverflow.com/questions/19360440/… It has some good clues and conversations about dealing with JSON in VBA, which is what you appear to be doing. Commented Mar 18, 2015 at 15:18
  • Thank you. I think I don't need to deal with json file. If I open it in chrome or mozilla it looks like text on website, so I would like to copy whole content and put in specific cell in excel. Then I'll run a macro which can extract only particular data. I might be wrong, I'm not very good in this sphere, but I'm learning....:) Commented Mar 24, 2015 at 13:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.