vinay salian
asked on
Automation of a manual file download task
Hi Experts,
Hoping someone can help me with a solution to automate a manual daily task
I need top download a file from a http (url - report server) site and save it to a folder at regular intervals ( hourly )
The manual process is as below
1) Go to the website/url using IE
2) Click on a drop-down item and select "Export to Excel"
3) A pop-up appears to Open or Save the .xlsx file
4) Click on Save button
5) Save it to a folder location on my pc.
I cant use any 3rd party tools or software as I cant download it due to restrictions in my organisation.
Preferably excel/vba solution or if there is an inbuilt windows solution to capture and record actions above and then schedule it at regular intervals.
Thanks
HTML:
<td class="ms-toolbar sqlrv-ToolBarCell" nowrap="nowrap">
<div id="m_sqlRsWebPart_RSWebPa rtToolbar_ ctl00_RptC ontrols_RS ActionMenu ">
<span style="display:none"><menu type='ServerMenu' id="m_sqlRsWebPart_RSWebPa rtToolbar_ ctl00_RptC ontrols_RS ActionMenu _ctl00"><i e:menuitem id="m_sqlRsWebPart_RSWebPa rtToolbar_ ctl00_RptC ontrols_RS ActionMenu _ReportBui lder_forRe ndering" type="option" onMenuClick="STSNavigate2( event,'http://project/PWA/_layouts/ReportServer/RSAction.aspx?RSAction=ReportBuilderViewer&ReportPath=http%3a%2f%2fproject%2fPWA%2fReports%2fPSD+Extract.rdl');" text="Open with Report Builder" menuGroupId="2147483647">< /ie:menuit em>
<ie:menuitem id="m_sqlRsWebPart_RSWebPa rtToolbar_ ctl00_RptC ontrols_RS ActionMenu _Print_for Rendering" type="option" onMenuClick="$find('m_sqlR sWebPart_c tl00_Repor tViewer'). invokePrin tDialog(); " text="Print" menuGroupId="2147483647">< /ie:menuit em>
<ie:menuitem id="m_sqlRsWebPart_RSWebPa rtToolbar_ ctl00_RptC ontrols_RS ActionMenu _Export" type="submenu" text="Export"><ie:menuitem id="m_sqlRsWebPart_RSWebPa rtToolbar_ ctl00_RptC ontrols_RS ActionMenu _Export_La bel" type="label" menuGroupId="2147483647">< /ie:menuit em><ie:men uitem id="m_sqlRsWebPart_RSWebPa rtToolbar_ ctl00_RptC ontrols_RS ActionMenu _XML" type="option" onMenuClick="$find("m _sqlRsWebP art_ctl00_ ReportView er"). exportRepo rt("X ML"); " text="XML file with report data" menuGroupId="2147483647">< /ie:menuit em>
<ie:menuitem id="m_sqlRsWebPart_RSWebPa rtToolbar_ ctl00_RptC ontrols_RS ActionMenu _CSV" type="option" onMenuClick="$find("m _sqlRsWebP art_ctl00_ ReportView er"). exportRepo rt("C SV"); " text="CSV (comma delimited)" menuGroupId="2147483647">< /ie:menuit em>
<ie:menuitem id="m_sqlRsWebPart_RSWebPa rtToolbar_ ctl00_RptC ontrols_RS ActionMenu _TAB" type="option" onMenuClick="$find("m _sqlRsWebP art_ctl00_ ReportView er"). exportRepo rt("T AB"); " text="TAB delimited" menuGroupId="2147483647">< /ie:menuit em>
<ie:menuitem id="m_sqlRsWebPart_RSWebPa rtToolbar_ ctl00_RptC ontrols_RS ActionMenu _PDF" type="option" onMenuClick="$find("m _sqlRsWebP art_ctl00_ ReportView er"). exportRepo rt("P DF"); " text="PDF" menuGroupId="2147483647">< /ie:menuit em>
<ie:menuitem id="m_sqlRsWebPart_RSWebPa rtToolbar_ ctl00_RptC ontrols_RS ActionMenu _MHTML" type="option" onMenuClick="$find("m _sqlRsWebP art_ctl00_ ReportView er"). exportRepo rt("M HTML" );" text="MHTML (web archive)" menuGroupId="2147483647">< /ie:menuit em>
<ie:menuitem id="m_sqlRsWebPart_RSWebPa rtToolbar_ ctl00_RptC ontrols_RS ActionMenu _EXCEL" type="option" onMenuClick="$find("m _sqlRsWebP art_ctl00_ ReportView er"). exportRepo rt("E XCEL" );" text="Excel" menuGroupId="2147483647">< /ie:menuit em>
<ie:menuitem id="m_sqlRsWebPart_RSWebPa rtToolbar_ ctl00_RptC ontrols_RS ActionMenu _IMAGE" type="option" onMenuClick="$find("m _sqlRsWebP art_ctl00_ ReportView er"). exportRepo rt("I MAGE" );" text="TIFF file" menuGroupId="2147483647">< /ie:menuit em>
<ie:menuitem id="m_sqlRsWebPart_RSWebPa rtToolbar_ ctl00_RptC ontrols_RS ActionMenu _WORD" type="option" onMenuClick="$find("m _sqlRsWebP art_ctl00_ ReportView er"). exportRepo rt("W ORD") ;" text="Word" menuGroupId="2147483647">< /ie:menuit em>
<ie:menuitem id="m_sqlRsWebPart_RSWebPa rtToolbar_ ctl00_RptC ontrols_RS ActionMenu _IMAGE (JPEG)" type="option" onMenuClick="$find("m _sqlRsWebP art_ctl00_ ReportView er"). exportRepo rt("I MAGE (JPEG)");" text="Image (JPEG)" menuGroupId="2147483647">< /ie:menuit em>
Hoping someone can help me with a solution to automate a manual daily task
I need top download a file from a http (url - report server) site and save it to a folder at regular intervals ( hourly )
The manual process is as below
1) Go to the website/url using IE
2) Click on a drop-down item and select "Export to Excel"
3) A pop-up appears to Open or Save the .xlsx file
4) Click on Save button
5) Save it to a folder location on my pc.
I cant use any 3rd party tools or software as I cant download it due to restrictions in my organisation.
Preferably excel/vba solution or if there is an inbuilt windows solution to capture and record actions above and then schedule it at regular intervals.
Thanks
HTML:
<td class="ms-toolbar sqlrv-ToolBarCell" nowrap="nowrap">
<div id="m_sqlRsWebPart_RSWebPa
<span style="display:none"><menu
<ie:menuitem id="m_sqlRsWebPart_RSWebPa
<ie:menuitem id="m_sqlRsWebPart_RSWebPa
<ie:menuitem id="m_sqlRsWebPart_RSWebPa
<ie:menuitem id="m_sqlRsWebPart_RSWebPa
<ie:menuitem id="m_sqlRsWebPart_RSWebPa
<ie:menuitem id="m_sqlRsWebPart_RSWebPa
<ie:menuitem id="m_sqlRsWebPart_RSWebPa
<ie:menuitem id="m_sqlRsWebPart_RSWebPa
<ie:menuitem id="m_sqlRsWebPart_RSWebPa
<ie:menuitem id="m_sqlRsWebPart_RSWebPa
What's the URL?
ASKER
Hi Norie,
Its a internal reporting service site
http://project/PWA/_layouts/ReportServer/blah blahblah...
Its a internal reporting service site
http://project/PWA/_layouts/ReportServer/blah blahblah...
Something like these can be automated with powershell and task scheduler.
if you can get the internal server path, shared...
Copy-Item -Source \\server\share\file -Destination C:\path\
From the web name, something like this:
Invoke-WebRequest -Uri "http://project/PWA/_layouts/ReportServer/blah " -OutFile "C:\path\file"
Use task scheduler to run it on a routine.
if you can get the internal server path, shared...
Copy-Item -Source \\server\share\file -Destination C:\path\
From the web name, something like this:
Invoke-WebRequest -Uri "http://project/PWA/_layouts/ReportServer/blah " -OutFile "C:\path\file"
Use task scheduler to run it on a routine.
ASKER
This is what I have so far...I can open the site but I cant select the menu option...see attached.
VBA-website-scraping.docx
VBA-website-scraping.docx
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.