VBA to open website and download a file

Martin sherk

Board Regular
Joined
Sep 11, 2022
Messages
94
Office Version
  1. 365
  2. 2016
I really need help with this one, as it's so tricky for me.

i download files multiple times a day from an intranet company website, i don't know how to utilize VBA with Java to complete the process

but below is my inspect element for the lines that i need to click on.

1) open the website
2) Click on "Vendors" button
<span class="dx-vam">Vendors</span>

3) Click on "Ledger" button
<span class="dx-vam dxm-contentText">Ledger</span>

4) Click on a drop down list
<img id="Horizontal_RNC_Menu_ITCNT1_xaf_a2_Cb_B-1Img" class="dxEditors_edtDropDown_Office2010Blue" src="/NetWeb/DXR.axd?r=1_89-mlzPp" alt="v">

5) Choose "Their invoice" from the drop down list
<td id="Horizontal_RNC_Menu_ITCNT1_xaf_a2_Cb_DDD_L_LBI2T0" class="dxeListBoxItem_Office2010Blue">Their invoice</td>

6) click on the drop down list
<img id="Horizontal_v3_10966268_LE_v3_DXFREditorcol13_B-1Img" class="dxEditors_edtDropDown_Office2010Blue" src="/NetWeb/DXR.axd?r=1_89-mlzPp" alt="v">

7) Choose "Missing" from the drop down list
<td id="Horizontal_v3_10966268_LE_v3_DXFREditorcol13_DDD_L_LBI0T1" class="dxeListBoxItem_Office2010Blue dxeT">Missing</td>

8) Click on "Export"
<span class="dx-vam dxm-contentText">Export</span>

9) Click "Ok"
<span class="dx-vam dxm-contentText">OK</span>

10) Wait till it loads then click "Ok" again
<span class="dx-vam dxm-contentText">OK</span>

11) Wait till it loads then click on the link of download
<span>AR_Invoices_Status_20221218_17.csv</span>

I would really appreciate if someone can help me automating this process and download this report, it would save us hours !

Thanks in advance.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

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