ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy a range from a CSV file in a webpage to my local worksheet (https://www.excelbanter.com/excel-programming/307698-copy-range-csv-file-webpage-my-local-worksheet.html)

Jav Pa

Copy a range from a CSV file in a webpage to my local worksheet
 
The webpage posts a daily cvs file. I need to direct excel to go to
the site, select the appropriate day, search for, say New York, than
copy the 24 consecutive cells on the row beginning 3 cells to the
right of New York to my local worksheet.

Any thoughts anyone. This would be my first time programming excel...


Thanks to all good-hearted souls!

Javier

Tom Ogilvy

Copy a range from a CSV file in a webpage to my local worksheet
 
Probably be easier to pull down the CSV file and process it in Excel.

Post the URL and maybe someone can advise you.

--
Regards,
Tom Ogilvy

"Jav Pa" wrote in message
om...
The webpage posts a daily cvs file. I need to direct excel to go to
the site, select the appropriate day, search for, say New York, than
copy the 24 consecutive cells on the row beginning 3 cells to the
right of New York to my local worksheet.

Any thoughts anyone. This would be my first time programming excel...


Thanks to all good-hearted souls!

Javier




Jav Pa

Copy a range from a CSV file in a webpage to my local worksheet
 
Thanks Tom, The URL is:
http://www.pjm.com/pub/account/lmpda/20040824-da.csv

This is for data of 08/24/2004.

Yes, manually bringing the file is one option. Is there a way to pass
the date to excel and have it fetch the file for me? This will at
least save me a couple steps.

Thanks for your interest in helping me.

Jav.

"Tom Ogilvy" wrote in message ...
Probably be easier to pull down the CSV file and process it in Excel.

Post the URL and maybe someone can advise you.

--
Regards,
Tom Ogilvy

"Jav Pa" wrote in message
om...
The webpage posts a daily csv file. I need to direct excel to go to
the site, select the appropriate day, search for, say New York, than
copy the 24 consecutive cells on the row beginning 3 cells to the
right of New York to my local worksheet.

Any thoughts anyone. This would be my first time programming excel...


Thanks to all good-hearted souls!

Javier


Tom Ogilvy

Copy a range from a CSV file in a webpage to my local worksheet
 
Dim dt as Date
dt = DateValue("Aug 24, 2004")

workbooks.Open "http://www.pjm.com/pub/account/lmpda/" & _
format(dt,"yyyymmdd") & "-da.csv"

or if it will always be todays date
workbooks.Open "http://www.pjm.com/pub/account/lmpda/" & _
format(date,"yyyymmdd") & "-da.csv"

This should open the CSV in excel and you can process it there.

--
Regards,
Tom Ogilvy


"Jav Pa" wrote in message
om...
Thanks Tom, The URL is:
http://www.pjm.com/pub/account/lmpda/20040824-da.csv

This is for data of 08/24/2004.

Yes, manually bringing the file is one option. Is there a way to pass
the date to excel and have it fetch the file for me? This will at
least save me a couple steps.

Thanks for your interest in helping me.

Jav.

"Tom Ogilvy" wrote in message

...
Probably be easier to pull down the CSV file and process it in Excel.

Post the URL and maybe someone can advise you.

--
Regards,
Tom Ogilvy

"Jav Pa" wrote in message
om...
The webpage posts a daily csv file. I need to direct excel to go to
the site, select the appropriate day, search for, say New York, than
copy the 24 consecutive cells on the row beginning 3 cells to the
right of New York to my local worksheet.

Any thoughts anyone. This would be my first time programming excel...


Thanks to all good-hearted souls!

Javier




Jav Pa

Copy a range from a CSV file in a webpage to my local worksheet
 
Thank you Tom. I will search the worksheet once in excel.

Very nice of you.


"Tom Ogilvy" wrote in message ...
Dim dt as Date
dt = DateValue("Aug 24, 2004")

workbooks.Open "http://www.pjm.com/pub/account/lmpda/" & _
format(dt,"yyyymmdd") & "-da.csv"

or if it will always be todays date
workbooks.Open "http://www.pjm.com/pub/account/lmpda/" & _
format(date,"yyyymmdd") & "-da.csv"

This should open the CSV in excel and you can process it there.

--
Regards,
Tom Ogilvy


"Jav Pa" wrote in message
om...
Thanks Tom, The URL is:
http://www.pjm.com/pub/account/lmpda/20040824-da.csv

This is for data of 08/24/2004.

Yes, manually bringing the file is one option. Is there a way to pass
the date to excel and have it fetch the file for me? This will at
least save me a couple steps.

Thanks for your interest in helping me.

Jav.

"Tom Ogilvy" wrote in message

...
Probably be easier to pull down the CSV file and process it in Excel.

Post the URL and maybe someone can advise you.

--
Regards,
Tom Ogilvy

"Jav Pa" wrote in message
om...
The webpage posts a daily csv file. I need to direct excel to go to
the site, select the appropriate day, search for, say New York, than
copy the 24 consecutive cells on the row beginning 3 cells to the
right of New York to my local worksheet.

Any thoughts anyone. This would be my first time programming excel...


Thanks to all good-hearted souls!

Javier



All times are GMT +1. The time now is 11:52 PM.

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