Program: EXCEL 2010
OS: Windows 8.1
I am wanting to login to a site (I have a login script), navigate to a page, then download the `.CSV` file that will always end with a dynamic string due to it being 'custom'.
I have tried to access the site by recording a macro. However, as the data is not in a table the macro recorder is not able to pick up the actual address of the .csv file.
The display text is always:
The html values are always shown as:
Without using a table, is there a way to get to this .csv & save it to my PC?
I am aware that the use of
denotes it is part of a table, but it is definitely not picking it up, I've gone through the site using the macro recorder and it's not picking up the inner contents from the page.
As a secondary solution (and not my preferred):
I had also thought to navigate to the site page, highlight the text, copy & paste to a spare sheet in my book, then use some code L42 previously wrote here (below) however I can't even get the copy & paste to work correctly.
Please advise. Thank you in advance.
[1]: Cross posted: stackoverflow
OS: Windows 8.1
I am wanting to login to a site (I have a login script), navigate to a page, then download the `.CSV` file that will always end with a dynamic string due to it being 'custom'.
I have tried to access the site by recording a macro. However, as the data is not in a table the macro recorder is not able to pick up the actual address of the .csv file.
The display text is always:
Code:
Results [link]Click to Download[/link]
The html values are always shown as:
Code:
[COLOR=#800000][FONT=Consolas]<td[/FONT][/COLOR][COLOR=#000000][FONT=Consolas] [/FONT][/COLOR][COLOR=#FF0000][FONT=Consolas]class[/FONT][/COLOR][COLOR=#000000][FONT=Consolas]=[/FONT][/COLOR][COLOR=#0000FF][FONT=Consolas]"smallText"[/FONT][/COLOR][COLOR=#800000][FONT=Consolas]><b>[/FONT][/COLOR][COLOR=#000000][FONT=Consolas]Results[/FONT][/COLOR][COLOR=#800000][FONT=Consolas]</b>[/FONT][/COLOR][COLOR=#000000][FONT=Consolas] [/FONT][/COLOR][COLOR=#800000][FONT=Consolas]<a[/FONT][/COLOR][COLOR=#000000][FONT=Consolas] [/FONT][/COLOR][COLOR=#FF0000][FONT=Consolas]href[/FONT][/COLOR][COLOR=#000000][FONT=Consolas]=[/FONT][/COLOR][COLOR=#0000FF][FONT=Consolas]"vendor_report.php?report=custom [insert extremely long string here] >[/FONT][/COLOR][COLOR=#800000][FONT=Consolas]<u>[/FONT][/COLOR][COLOR=#000000][FONT=Consolas]Click to Download[/FONT][/COLOR][COLOR=#800000][FONT=Consolas]</u></a></td>[/FONT][/COLOR][COLOR=#000000][FONT=Consolas] [/FONT][/COLOR]
Without using a table, is there a way to get to this .csv & save it to my PC?
I am aware that the use of
Code:
<td>
As a secondary solution (and not my preferred):
I had also thought to navigate to the site page, highlight the text, copy & paste to a spare sheet in my book, then use some code L42 previously wrote here (below) however I can't even get the copy & paste to work correctly.
Code:
For Each hlink In ThisWorkbook.Sheets("NameOfYourSheet").Hyperlinks
Set wb = Workbooks.Open(hlink.Address)
wb.SaveAs saveloc & hlink.Range.Offset(0,1).Value & ".xlsx"
wb.Close True
Set wb = Nothing
Next
Please advise. Thank you in advance.
[1]: Cross posted: stackoverflow
Last edited: