internet connection via excel macro at timed intervels & save data to excel file.

S

Sam

Hi Gang,

I looked around and found bits and pieces to what I was looking for
but did not find all the pieces to put it all togther.

What I am looking to do is use a macro to:

1. Access a company website website once a day (example: 5:45am).
2. Tab over a couple of radio buttons to get a section I need to
download data from ( I think I can do this)
3. Run a query from the website. (essentially clicking on a single
button to extract data from the past 24 hours)
4. Copy all of the data the data that returns (Control A).
5. Paste it unto a blank MS Excel file and save on my computer in a
pretermined folder.

As always my sincere thanks to all the members in the forum!

Sam
 
S

Sam

Hi Gang,

I looked around and found bits and pieces to what I was looking for
but did not find all the pieces to put it all togther.

What I am looking to do is use a macro to:

1. Access a company website website once a day (example: 5:45am).
2. Tab over a couple of radio buttons to get a section I need to
download data from ( I think I can do this)
3. Run a query from the website. (essentially clicking on a single
button to extract data from the past 24 hours)
4. Copy all of the data the data that returns (Control A).
5. Paste it unto a blank MS Excel file and save on my computer in a
pretermined folder.

As always my sincere thanks to all the members in the forum!

Sam

Ok I have found a number of elements I will need:

1. The Scheduled Tasks feature to open the file. (done)
2. The macro to open start the internet connection macro. (not sure
how to do this yet).
3. The internet connection macro. (done)

I still need to tab over a few radio buttons on the website but I
think I can do this.

Can anyone help?

Thnks

Sam
 
S

Sam

Hi Gang,

I looked around and found bits and pieces to what I was looking for
but did not find all the pieces to put it all togther.

What I am looking to do is use a macro to:

1. Access a company website website once a day (example: 5:45am).
2. Tab over a couple of radio buttons to get a section I need to
download data from ( I think I can do this)
3. Run a query from the website. (essentially clicking on a single
button to extract data from the past 24 hours)
4. Copy all of the data the data that returns (Control A).
5. Paste it unto a blank MS Excel file and save on my computer in a
pretermined folder.

As always my sincere thanks to all the members in the forum!

Sam

*Update*
Does anyone see me over here? lol In any case here's what I have so
far:

After setting the "Scheduled Tasks" to the desired time...

Private Sub Workbook_Open()
'Sub Auto_Open() myurl = "http://www.anywebsite.com"
With ActiveWorkbook.Worksheets("Daily DMR
Report").QueryTables.Add( _
Connection:="URL;" & myurl, Destination:=Worksheets("Daily DMR
Report").Cells(1, 1))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
Worksheets("Daily DMR Report").Copy
ActiveWorkbook.SendMail "(e-mail address removed)"
End With
End Sub

My question is how do I tab over buttons on a webpage? I have never
done this before and unfortunatley will have to wait until I get to
work tommarow. Once the website opens I still need to specifically
select the tab I want to pull the data from. Then wait for the record
query to return the data. Only then do I need to "copy all" and paste
it unto the Excel sheet.

I figured I would just mail a copy to myself or others every day to
prevent further complication of directing the data to be saved to a
specific folder. (which would be nice) but I figure I will go simple
for now. lol

Please help I'm feeling a little beleagured.

Sam
 
A

Akash Patel

I actually have the same exact problem. I would like excel to download
data from a website. First my macro crashes to do this because if I hit
the refresh button it normally takes 15 seconds to get the data. My
macro button can't handle this. Second I would like to copy this data on
a seperate part of excel every 5 min. I really need some help.
thanks
Akash
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top