bcooler
Programmer
- Jun 13, 2009
- 132
Hello all-
I am trying to automatically update a table in my database with the latest Excel files that become available online. Specifically, files from this website: [URL unfurl="true"]http://www.defensetravel.dod.mil/site/perdiemFiles.cfm[/url].
The CONUS Excel files are typically updated once per year, but could be updated at any time. The OCONUS files are updated monthly.
My proposed scheme was to check these files once per day and update as necessary. I figured out how to obtain the OCONUS file because the file name has a predictable file name using the date. No problems there.
The CONUS file naming convention is not obvious and is frustrating.
Here's what I need: Assuming the file is always located at [URL unfurl="true"]http://www.defensetravel.dod.mil/Docs/perdiem/browse/Allowances/Per_Diem_Rates/Text_Only/Continental-US/2013/FILENAME.xls[/url], (actual file name unknown for the sake of discussion), and that there is only 1 Excel file to be found, can I ask VBA to look in this online folder ([URL unfurl="true"]http://www.defensetravel.dod.mil/Docs/perdiem/browse/Allowances/Per_Diem_Rates/Text_Only/Continental-US/2013/[/url]), find the Excel file kept there, and then download it (without knowing the actual file name ahead of time)? I see this as something similar to using wildcards in Windows Explorer (*).
Hope that makes sense,
Brian
I am trying to automatically update a table in my database with the latest Excel files that become available online. Specifically, files from this website: [URL unfurl="true"]http://www.defensetravel.dod.mil/site/perdiemFiles.cfm[/url].
The CONUS Excel files are typically updated once per year, but could be updated at any time. The OCONUS files are updated monthly.
My proposed scheme was to check these files once per day and update as necessary. I figured out how to obtain the OCONUS file because the file name has a predictable file name using the date. No problems there.
The CONUS file naming convention is not obvious and is frustrating.
Here's what I need: Assuming the file is always located at [URL unfurl="true"]http://www.defensetravel.dod.mil/Docs/perdiem/browse/Allowances/Per_Diem_Rates/Text_Only/Continental-US/2013/FILENAME.xls[/url], (actual file name unknown for the sake of discussion), and that there is only 1 Excel file to be found, can I ask VBA to look in this online folder ([URL unfurl="true"]http://www.defensetravel.dod.mil/Docs/perdiem/browse/Allowances/Per_Diem_Rates/Text_Only/Continental-US/2013/[/url]), find the Excel file kept there, and then download it (without knowing the actual file name ahead of time)? I see this as something similar to using wildcards in Windows Explorer (*).
Hope that makes sense,
Brian