Importing Non-Table Data

ercedwards

Board Regular
Joined
Apr 27, 2013
Messages
125
I use a web site to monitor when my son gets dispatched on a fire call

[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]https://www.toronto.ca/community-people/public-safety-alerts/alerts-notifications/toronto-fire-active-incidents/

I have a macro that works fine on my Windows 8 computer but not on Windows 10 and no one in the world seems to have an answer as to why although lots of people have the same issue. The infamous 8150002e run-time error.

The real data I want from this web site is NOT in a table so using Web Query is not an option. The real data is <td> and <tr> objects on the web page.

Does anyone know of a way to grab this data in VBA and drop it into Excel?

Thanks
[/FONT]
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
do you want this or something more?

Prime StreetCross StreetDispatch TimeIncident NumberIncident TypeAlarm LevelAreaDispatched Units
/
02/03/2019 11:14​
F19023310Vehicle - Personal Injury Highway
0​
441​
R441, A415
BRIDGELAND AVE, NYDUFFERIN ST / CALEDONIA RD
02/03/2019 11:39​
F19023318Vehicle - Personal Injury
0​
145​
P145
M9P
02/03/2019 11:45​
F19023319MEDICAL
0​
443​
P443
M4K
02/03/2019 11:45​
F19023320MEDICAL
0​
322​
P322
 
Upvote 0
after refresh I got this:

Prime StreetCross StreetDispatch TimeIncident NumberIncident TypeAlarm LevelAreaDispatched Units
BRIDGELAND AVE, NYDUFFERIN ST / CALEDONIA RD
02/03/2019 11:39​
F19023318Vehicle - Personal Injury
0​
145​
P145
M1B
02/03/2019 11:57​
F19023323MEDICAL
0​
214​
A213
M5V
02/03/2019 12:05​
F19023324MEDICAL
0​
334​
P332
M2M
02/03/2019 12:06​
F19023325MEDICAL
0​
111​
P111
REXDALE BLVD / HUMBERWOOD BLVD
02/03/2019 12:07​
F19023326Vehicle - Personal Injury
0​
412​
R412
CHEROKEE BLVD, NYNAVAHO DR / APACHE TRL
02/03/2019 12:10​
F19023327Fire - Residential
0​
113​
A113, HZ145, P234, C11, P116, R115, R241
M4X
02/03/2019 12:10​
F19023328MEDICAL
0​
313​
P313
 
Upvote 0
so,
you can use Power Query (Excel 2010/2013 add-in, Excel 2016 and above - built in as Get&Transform)

then you can set refresh connection every 5 minutes

Prime StreetCross StreetDispatch TimeIncident NumberIncident TypeAlarm LevelAreaDispatched Units
DANFORTH AVE, TTPLAYTER BLVD / BOWDEN ST
02/03/2019 12:46​
F19023340Fire - Commercial/Industrial
0​
313​
S313, P313, A322, C32, P322, P324
DUNDAS ST W / DUFFERIN ST
02/03/2019 13:03​
F19023348Check Call
0​
426​
P426, A345, C34
/
02/03/2019 13:04​
F19023351Vehicle - Personal Injury Highway
0​
445​
R444, P443, P433
M6L
02/03/2019 13:31​
F19023360MEDICAL
0​
146​
P146
SPADINA RD, TTLOWTHER AVE / KENDAL AVE
02/03/2019 13:33​
F19023361Fire - Highrise Residential
0​
344​
P344, P315, A315, C31, P312, A315
M6M
02/03/2019 13:35​
F19023362MEDICAL
0​
421​
R421
M6S
02/03/2019 13:39​
F19023364MEDICAL
0​
422​
P422
BRIAR HILL AVE, TTBATHURST ST / MANITOU BLVD
02/03/2019 13:40​
F19023365Alarm Highrise Residential
0​
135​
P132, R341, A135, P131, C31
ALTON TOWERS CRCL, SCBATTINGER GT / PENMARRIC PL
02/03/2019 13:46​
F19023366Alarm Commercial/Industrial
0​
242​
P242, P211, A244, C24, R241
 
Upvote 0
Unfortunately I don't have the higher level of Excel for Power Shell.

The good news is however that less than 2 minutes ago I tried something bizarre in terms of fixing the
infamous 8150002e run-time error.

That bizarre move seem to have my other VBA working again.

Thanks for all your help.

 
Upvote 0
here is example file

refresh interval is set to 3 minutes, you can change it in connection properties

edit:

btw. this is NOT Power Shell but Power Query (Get&Transform)

anyway I am glad that you solved the problem
 
Last edited:
Upvote 0
so you can download PowerQuery add-in from MS site (it's free), install it and open the file from the post

Power Query add-in for Excel - choose correct version (32 or 64 bit)

don't care about version warning ;), just Close
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,818
Messages
6,121,725
Members
449,049
Latest member
MiguekHeka

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top