Таргетинг на скачивание превосходит через href. Тем не менее, не удается загрузить все образцы с циклом (когда ссылки href выглядят одинаково). что может быть в этом случае? после загрузки этих файлов, как сохранить каждый Excel в локальной папке C?
Вот необходимые ссылки HTML href
<td class="tenderlink">
<a href='/Documents/ProcurementDisposal/20190419102042818.xls'
target="_blank">View</a></td>
Код:
Sub download()
'Application.ScreenUpdating = False
Dim ie As InternetExplorer
Dim ele As Object
Set ie = New InternetExplorer
With ie
.Visible = True
.Navigate2 "http://www.nafed-india.com/Home/ProcDispoDetails"
While .Busy Or .readyState < 4: DoEvents: Wend
End With
For Each ele In ie.document.querySelector("a[href^='/Documents/ProcurementDisposal']").Click
Next ele
End Sub