ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to automate a import from a webpage (https://www.excelbanter.com/excel-programming/363492-how-automate-import-webpage.html)

vigfus

How to automate a import from a webpage
 
Aaaaaarg, i'm stuck...

I know how to make basic functions in Exel, i even made some really
complicated ones, but i think i need another approach to fix this.

I want to import a table from a webpage (easy, just make a webquery that
updates every now and then) then i want to take some of that information and
save to plot a graph, sort of like with the stockmarket.

This is my problem... i don't know how to do this. I need to copy the part i
want to keep progressiveley further away. I don't even know how to automate
the copying of one set of numbers, let alone how to make the procedure
"mobile". This is a graphic explanation of what i want to do:

http://img331.imageshack.us/my.php?i...kmarket8zg.jpg

The red part is the raw data i can fetch automatically. The green is the
part i want to save from each dataset. You can see that i have manually
copied four parts into place and i want to keep pasting the new parts onto
the right of the green area.

Please help. If indeed this is impossible with Excel i would appreciate tips
on what software could do it.

Thank you.

Don Guillett

How to automate a import from a webpage
 
All you need to do is use a macro that

runs your web query (or refresh)
copies the desired data to the next column available(preferably on another
sheet)

something like this should get you started to find the column to copy to
dlc=sheets("sheet2").cells(1,columns.count).end(xl toleft).column+1
sheets("data").columns(2).copy sheets("sheet2").columns(dlc)

--
Don Guillett
SalesAid Software

"vigfus" wrote in message
...
Aaaaaarg, i'm stuck...

I know how to make basic functions in Exel, i even made some really
complicated ones, but i think i need another approach to fix this.

I want to import a table from a webpage (easy, just make a webquery that
updates every now and then) then i want to take some of that information
and
save to plot a graph, sort of like with the stockmarket.

This is my problem... i don't know how to do this. I need to copy the part
i
want to keep progressiveley further away. I don't even know how to
automate
the copying of one set of numbers, let alone how to make the procedure
"mobile". This is a graphic explanation of what i want to do:

http://img331.imageshack.us/my.php?i...kmarket8zg.jpg

The red part is the raw data i can fetch automatically. The green is the
part i want to save from each dataset. You can see that i have manually
copied four parts into place and i want to keep pasting the new parts onto
the right of the green area.

Please help. If indeed this is impossible with Excel i would appreciate
tips
on what software could do it.

Thank you.




vigfus

How to automate a import from a webpage
 
Thank you for the quick answer!

Unfortunately my knowledge of macros stretches as far as to record a basic
macro. Not edit it afterwards... I have tried but failed. A more elaborate
explanaition would be nice, but i think i could manage with some link to
related information.

Don Guillett

How to automate a import from a webpage
 
Just put what I gave you in a submodify to suit your sheet namescolumns,
etc or contact me privately for custom work

sub copydatatosheet2()
dlc=sheets("sheet2").cells(1,columns.count).end(xl toleft).column+1
sheets("data").columns(2).copy sheets("sheet2").columns(dlc)
end sub

--
Don Guillett
SalesAid Software

"vigfus" wrote in message
...
Thank you for the quick answer!

Unfortunately my knowledge of macros stretches as far as to record a basic
macro. Not edit it afterwards... I have tried but failed. A more elaborate
explanaition would be nice, but i think i could manage with some link to
related information.




vigfus

How to automate a import from a webpage
 
It works! Thanks!

I changed copy to cut to make it more noticeable when the macro runs. Now
that i've gotten this far i have grander goals. ;)

I still don't know how to automate the macro. I still have to be there to
start the macro. It would be neat if the macro could start automaticly when
some value appears in the raw data page (at the place i cut it from). Is this
still possible?

Don Guillett

How to automate a import from a webpage
 
Lazy aren't we?
As I said before, you can run your query or refresh from the macro and you
can even set up the macro to run automatically. Look in vba help index for
ONTIME

--
Don Guillett
SalesAid Software

"vigfus" wrote in message
...
It works! Thanks!

I changed copy to cut to make it more noticeable when the macro runs. Now
that i've gotten this far i have grander goals. ;)

I still don't know how to automate the macro. I still have to be there to
start the macro. It would be neat if the macro could start automaticly
when
some value appears in the raw data page (at the place i cut it from). Is
this
still possible?




vigfus

How to automate a import from a webpage
 
Hehe, a little lazy i guess. ;) It's just comforting to deal with someone who
knows his stuff.

I will check the helpfiles... Once again, thanks.


All times are GMT +1. The time now is 08:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com