Extracting data from website source code

MrErixGrafx

New Member
Joined
Aug 8, 2016
Messages
2
I would appreciate if any super experts would help to find a solution to extract source code data from a chart found on a website and build a macro to automatically import the data to excel. The website's source code is from: Load Forecast vs. Actual: Current Day

The data to extract is the "Current-Day Forecast" and it has the following format:

HTML:
This data changes daily and I would like a macro automatically import these 24 rows of data and find the ##,### MW number and put it into an Excel Table.

Currently, this data is imported by copying and pasting the data to an Excel Spreadsheet and then the following formula '=VALUE(TRIM(CLEAN(LEFT(RIGHT(A2,19),6))))' extracts the data from each cell to another cell to build the column.

An idea I have is to find the following line of code:<map name="CHART_IMAGE_MAP"> then </map>the following 24 lines of code after this need to be put into the spreadsheet.

Any ideas would be appreciated.
I have excel versions 2007, 2010, and the latest Office 365.

 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
HTML didn't come in correctly in the Post:
Code:
<area shape="circle" coords="87,340,5" title="Current-Day Forecast:  HE 01  48,456 MW" alt=""/><br><area shape="circle" coords="110,374,5" title="Current-Day Forecast:  HE 02  45,099 MW" alt=""/><br>
<area shape="circle" coords="133,394,5" title="Current-Day Forecast:  HE 03  43,180 MW" alt=""/><br>
<area shape="circle" coords="155,407,5" title="Current-Day Forecast:  HE 04  41,885 MW" alt=""/><br>
<area shape="circle" coords="178,411,5" title="Current-Day Forecast:  HE 05  41,476 MW" alt=""/><br>
<area shape="circle" coords="201,401,5" title="Current-Day Forecast:  HE 06  42,486 MW" alt=""/><br>
<area shape="circle" coords="223,384,5" title="Current-Day Forecast:  HE 07  44,130 MW" alt=""/><br>
<area shape="circle" coords="246,377,5" title="Current-Day Forecast:  HE 08  44,885 MW" alt=""/><br>
<area shape="circle" coords="269,351,5" title="Current-Day Forecast:  HE 09  47,398 MW" alt=""/><br>
<area shape="circle" coords="291,309,5" title="Current-Day Forecast:  HE 10  51,563 MW" alt=""/><br>
<area shape="circle" coords="314,264,5" title="Current-Day Forecast:  HE 11  55,967 MW" alt=""/><br>
<area shape="circle" coords="337,223,5" title="Current-Day Forecast:  HE 12  60,024 MW" alt=""/><br>
<area shape="circle" coords="359,188,5" title="Current-Day Forecast:  HE 13  63,466 MW" alt=""/><br>
<area shape="circle" coords="382,155,5" title="Current-Day Forecast:  HE 14  66,708 MW" alt=""/><br>
<area shape="circle" coords="405,130,5" title="Current-Day Forecast:  HE 15  69,202 MW" alt=""/><br>
<area shape="circle" coords="427,122,5" title="Current-Day Forecast:  HE 16  69,982 MW" alt=""/><br>
<area shape="circle" coords="450,122,5" title="Current-Day Forecast:  HE 17  69,961 MW" alt=""/><br>
<area shape="circle" coords="473,124,5" title="Current-Day Forecast:  HE 18  69,840 MW" alt=""/><br>
<area shape="circle" coords="495,151,5" title="Current-Day Forecast:  HE 19  67,181 MW" alt=""/><br>
<area shape="circle" coords="518,169,5" title="Current-Day Forecast:  HE 20  65,325 MW" alt=""/><br>
<area shape="circle" coords="541,193,5" title="Current-Day Forecast:  HE 21  62,982 MW" alt=""/><br>
<area shape="circle" coords="563,216,5" title="Current-Day Forecast:  HE 22  60,736 MW" alt=""/><br>
<area shape="circle" coords="586,261,5" title="Current-Day Forecast:  HE 23  56,252 MW" alt=""/><br>
<area shape="circle" coords="609,306,5" title="Current-Day Forecast:  HE 24  51,809 MW" alt=""/><br>
 
Upvote 0
Warning

On attempting to download your file it downloaded a Mortgage-Payments.rar file.

This may be an error but you are unlikely to get any help with that download!
 
Upvote 0

Forum statistics

Threads
1,215,504
Messages
6,125,183
Members
449,212
Latest member
kenmaldonado

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