Smart Web Queries in Excel

lukman4068

New Member
Joined
Jun 15, 2009
Messages
24
Hi,

I wanted to know if this is possible.

I have a scenario where I have reports generated on a website from a different department.

The issue is that because they're daily updates, the link for the most up to date information changes daily to that days date, for example,

For the reports from yesterdays work i'll have a link which ends 27jul.htm, but the next day I'll have a link ending 28jul.htm - and the reports are only generated Monday - Saturday.

Is there any way of getting excel to know to change the website that it tries to draw data from automatically by amending the link to match, say for example today()-1

or something like that which also excludes Sunday and Bank Holiday reporting?

Thanks for your advice,
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Should be pretty straightforward to generate the that part of the link based on the current date.

The harder part would be dealing with the dates you don't want to include.

What date(s) would you want to use for those?

By the way have you ever considered not naming the reports like this?

Perhaps give them a generic name and when you create a new report archive the previous one with the relevant date.
 
Upvote 0
Should be pretty straightforward to generate the that part of the link based on the current date.

The harder part would be dealing with the dates you don't want to include.

What date(s) would you want to use for those?

By the way have you ever considered not naming the reports like this?

Perhaps give them a generic name and when you create a new report archive the previous one with the relevant date.
They're not date's rather days - Sunday's and Bank Holiday dates.

I have thought about getting the reports generated on something more generic - for example to always be today.html or yesterday.html but I'm not sure how long it will take to get that sorted so wanted to see if there are any other ways round it for now.

How would you do it for the current date? it's not the whole date - it is normally in the format as above of www.website.com/28jun.html
 
Upvote 0
i take it that you post that into the actual web query address line where the browser menu appears?

1sh7yh.jpg
 
Upvote 0
Oops. my bad I assumed you were using VBA.:oops:

If your not then you could still create the link in a cell but I don't know how, if you even can, you could use that for a web query outside code.:)
 
Upvote 0
I don't know anything about VBA :( What would I have to do to use VBA to make that work? :-/

I'm suspecting then the easiest option is to get the report pages to be generated on something more generic as suggested earlier...
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top