E
Erik Klausen
Hi Group.
I'm trying to read a HTML page from VBA. The page contains a graph,
generated as a PNG-file, and I want to insert this graph in the
spreadsheet.
I can read the HTML page using the following code:
Dim ObjIE As New InternetExplorer
ObjIE.Navigate Worksheets("Mellemregninger").Range("B13")
ObjIE.Visible = True
Do Until ObjIE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
S = ObjIE.Document.Body.InnerHTML
The HTML code that the program recieves has been parsed by Internet
Explorer, though. If I go to the browser window and select "view
source", I get the original code that I really want, but the VBA code
receives a slightly different version.
This is a problem, since the web page sends some code to handle .png
files. Therefore, the reference to the .png-file has been changed to a
reference to blank.gif when VBA sees it.
Can I do something about it? I'd prefer to solve the problem in the code,
not by configuring the browser. Also, the chance of getting the web page
changed isn't good.
Versions: Excel is version 2003 (11.8105.8107), VBE is version 6.3,
Internet Explorer is version 6.0.2900.2180
TIA,
Erik Klausen
I'm trying to read a HTML page from VBA. The page contains a graph,
generated as a PNG-file, and I want to insert this graph in the
spreadsheet.
I can read the HTML page using the following code:
Dim ObjIE As New InternetExplorer
ObjIE.Navigate Worksheets("Mellemregninger").Range("B13")
ObjIE.Visible = True
Do Until ObjIE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
S = ObjIE.Document.Body.InnerHTML
The HTML code that the program recieves has been parsed by Internet
Explorer, though. If I go to the browser window and select "view
source", I get the original code that I really want, but the VBA code
receives a slightly different version.
This is a problem, since the web page sends some code to handle .png
files. Therefore, the reference to the .png-file has been changed to a
reference to blank.gif when VBA sees it.
Can I do something about it? I'd prefer to solve the problem in the code,
not by configuring the browser. Also, the chance of getting the web page
changed isn't good.
Versions: Excel is version 2003 (11.8105.8107), VBE is version 6.3,
Internet Explorer is version 6.0.2900.2180
TIA,
Erik Klausen