Macro to download excel file from the URL

If you are on a company computer, the firewall may block it. Here at work I cannot see it either, only at home.
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
I received your email.
When you right click the BPO_DVW button, do you get the inspect element option? I need a screen shot of the DOM code, as I posted before.
 
Upvote 0
  • I doubt we will be able to click that button with VBA.
  • Anyway, please run the test code below and report the result. It produces a list of all page elements and counts the number of buttons in it. My sample page has more than two hundred buttons…

Code:
Sub Btns()
Dim ie As Object, elems, ws As Worksheet, i%, arr()
Set ws = Sheets("summary")                          ' list is written here
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = 1
ie.navigate "https://www.youtube.com/gaming"        ' desired page here
While ie.busy
    DoEvents
Wend
Set elems = ie.Document.getElementsByTagName("*")   ' all elements
ws.[a:b].ClearContents
ReDim arr(1 To elems.Length, 1 To 2)
On Error Resume Next
For i = 1 To elems.Length
    arr(i, 1) = elems(i).Name
    arr(i, 2) = elems(i).Type                       ' is it a button?
Next
On Error GoTo 0
ws.[a1].Resize(UBound(arr, 1), UBound(arr, 2)).Value = arr
MsgBox WorksheetFunction.CountIf([b:b], "button") & " buttons were found."
End Sub
 
Upvote 0
You also need to change the sheet name to an existing one. What line throws the error?
 
Upvote 0
Application is opening now. But still getting the error "Method 'document' of object '|WebBrowser2' failed.

Not showing any yellow line on coding
 
Upvote 0
  • From your last email, the business role field seems to be required.
  • Taking a step back, I do not think the button click method will work here. I suggest you investigate the alternative mentioned below.

As stated earlier BIRT supports exporting to Excel. The BIRT Excel emitter creates a Microsoft Office XML XLS document that can be opened in Microsoft Office 2003 or greater. To use this feature either add the __format=xls parameter to the BIRT viewer URL or use the AJAX export button.


1down vote
favorite

1
I have birt-viewer running on apache tomcat. I thought there might be an option to use a URL parameter that will directly export the report to XLS format and send it to the user.
I couldn't find a way to do that. Is it possible?
Thanks!
excelurlbirt
shareimprove this question
asked Nov 21 '10 at 14:44

Ben
4,7051876142
add a comment
1 Answer

activeoldestvotes
up vote5down voteaccepted
Got it. add "&__format=xls" to url.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,738
Messages
6,174,207
Members
452,551
Latest member
croud

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