none
Export SCCM Report to CSV RRS feed

  • Question

  • I am trying to create a Macro based Excel file that would contain a Macro, when executed would download a SCCM Report into a CSV file. At the moment I have to manually go to the webpage, wait for the report to be created and then click on a "Export to a file" button then choose a location and save. All is fine but I wanted to have some kind of automation. Since the webpage is created using SSRS reporting I cannot use standard HTML call out procedures like in these YouTube videos:

    I have tried these VBA lines:

    Sub Get_SCCM()
     
    Dim IE As New InternetExplorer

    IE.Visible = True

    IE.navigate "www.google.co.uk"

    Do
      DoEvents
    Loop Until IE.readyState = READYSTATE_COMPLETE

    Set TextBox = IE.document.getElementsByName("q")
    TextBox.Item(0).Value = "OK"

    End Sub

    This Macro executes without any problems and you can see that the "OK" has been input into the Google searchbox. But When I tried this code:

    Sub Get_SCCM()
     
    Dim IE As New InternetExplorer

    IE.Visible = True

    IE.navigate "http://<Server_Name>/Reports/Pages/Report.aspx?ItemPath=%2f<Reports_Name>%2fInfrastructure%2f<Name>%2f<Report_File_Name>"

    Do
      DoEvents
    Loop Until IE.readyState = READYSTATE_COMPLETE

    End Sub

    I receive an error:

    Run-time error '-2147417848 (80010108)'

    Automation error

    The object invoked has disconnected from its clients

    Even does not work when trying to add extra lines like IE.document etc.

    Any suggestions on how to export a CSV file with the report from SCCM webpage using VBA in Excel.

    Thanks!

    Tuesday, March 11, 2014 4:55 PM

Answers

  • SSRS reports can be automatically sent to a file.  Ask your admin how to configure a custom scheduled report.   The report can go to disk or beemailed on the scheduled.


    ¯\_(ツ)_/¯

    • Proposed as answer by Mikw77 Tuesday, April 29, 2014 3:32 PM
    • Marked as answer by Bill_StewartModerator Saturday, May 17, 2014 3:54 AM
    Tuesday, March 11, 2014 5:09 PM