Skip to Content
author's profile photo Former Member
Former Member

Use RESTFUL call to export webi report to CSV file

Hi

I have a Powershell script that connects to BO server to export webi report to PDF and Excel file, the export for both are successful. What is the mime type to use to export the report to CSV? I tried using "text/CSV" but that caused error

Here is the code snippet

$headers = @{ "X-SAP-LogonToken" = $logonToken ; "Accept" = "text/csv" ; "X-SAP-PVL" = $contentLocale }

Invoke-webrequest -Method Get -Uri $documentUrl -Headers $headers -OutFile $rptfile

Here is the runtime error message

Invoke-webrequest : RWS 00058 Not acceptable, (RWS 00058)

At C:\temp\abc.ps1:118 char:5

+ Invoke-webrequest -Method Get -Uri $documentUrl -Headers $headers -OutFile $ ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException

+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jun 27, 2016 at 01:37 PM

    You might get a better response if you ask this question here: RESTful Web Services SDK

    -Dell

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.