PDA

View Full Version : using vba to copy and paste from a website



henrymorg
08-02-2010, 01:46 AM
Hi,

First of all apologies that I don't know a great deal about any of this so may therefore phrase my query using incorrect or confusing terms.

I have basically found out how to (using VB) open up and log into a web page containing data that I would like to export into excel. I think that the page is fairly java based which has made this task fairly confusing for me. I would basically like to copy rows with various dates/ names in the first and second columns and then paste them into excel. If I haven't given enough info then please ask or even just a few pointers (how to select/copy/paste text) would be great!

I have attached an image to show the data that I would like to copy.

Many thanks in advance,

Henry

Shred Dude
08-02-2010, 09:49 AM
Is should be possible, but I'd need to be able to log into that website to review the underlying webpage structure. Using your URL: https://s02.pharma.wkhelth.com/microstrategy/asp/main.aspx doesn't get me there without the login credentials.

Are you able to Save a copy of the report using that little disc icon shown on that screen? Maybe as a Text file? If so that'd be easy to work with. Any other Export options buried in those menu options on that screen?

If not, scraping the data from the form they display would be the way to go.

How about right clicking that page, and see if you can "View Source" If so, copy the portion of that HTML code and post it up as an example.

henrymorg
08-03-2010, 04:59 AM

henrymorg
08-03-2010, 05:02 AM
Reply doesn't seem to be showing up...

henrymorg
08-03-2010, 05:05 AM
Many thanks for your reply. You can actually save the results as an excel file which would be ideal, by clicking on the icon to the left of the pdf icon; that would be ideal but I have no idea how to select items within the page. Clicking it opens up another window, which after bypassing IE security comes up with the download dialogue.

I've pasted the page source below.

Thanks once again,

Henry

henrymorg
08-03-2010, 05:11 AM
https://www.yousendit.com/download/T1VtcXlwMGt3TGhjR0E9PQ