Search code examples
excelbusiness-objectsbusiness-objects-sdkwebi

Download Webi report from Excel


With newly released Webi there's no way to manipulate reports with VBA like it was in DESKI era.

I'd like to know if there's a way for me to click a button with parameters in Excel sheet and get a report from the server?

I've been thinking of using the RESTful Web-services but it seems that there is a performance problem.

I also considered using a JAVA app in the middle using the SDK but it's not really satisfying as I add one layer.

Do you know if there's an other way to download a Webi report from and to Excel?


Solution

  • For this type of requirement, you'd normally use the OpenDocument feature. There is one thing that it won't do however, at least not for Webi documents, and that is deliver the output in Excel format (HTML and PDF are the two possible formats for Webi). In all fairness, the export to Excel option is only about two or three clicks away, but I can understand that this wouldn't be an ideal solution.

    Another option is the Java SDK, which I would not recommend, as the ReBEAN SDK (the part of the Java SDK you need to interface with Webi documents) is deprecated and replaced by the REST SDK.

    The REST SDK would be the way to go if the OpenDocument feature is not sufficient. Keep in mind that this would involve quite a few steps, each time sending a command to the WACS server and then decoding the answer. The steps would be:

    • Authenticate and get a logon token
    • Refresh the document (if necessary pass prompt values)
    • Export the document to Excel
    • Close the document

    The REST interface is only supported on the WACS server, which should run on your BI4 server (unless you have a customised landscape). If it's slow, I would suggest looking into the root cause of this performance issue, instead of discarding the SDK altogether.

    If you're going to use the REST interface, I would recommend opting for JSON to communicate through REST instead of XML. It's easier to read and parse.

    A last option, which I wouldn't recommend, is LiveOffice. This is a separate product which allows you to embed contents from Webi documents into Office documents (most notably Excel). LiveOffice has always had its share of problems and has not received much love from SAP regarding much needed updates.

    One final thought: the report will never appear in the same sheet, at least not without an additional amount of coding. Whatever SDK you end up choosing, you will always end up with an Excel file. If you want to show the results in the Excel file you started from, you'll need to code the steps to open the generated file, grab the contents and then copy those to your worksheet.