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.

Community
  • 1
  • 1
kolis29
  • 115
  • 2
  • 3
  • 11
  • Take a look here: http://stackoverflow.com/questions/19360440/how-to-parse-json-with-vba-without-external-libraries It has some good clues and conversations about dealing with JSON in VBA, which is what you appear to be doing. – JNevill Mar 18 '15 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....:) – kolis29 Mar 24 '15 at 13:51

0 Answers0