I'm developing a SAP BW web reporting environment. One of the options the users want, is to export the report from Internet Explorer to Excel. Does anyone have any experience or tips on how to do this?
How to¡¦
Download from a Web Query into Excel
BUSINESS INFORMATION WAREHOUSE
ASAP ¡°How to¡¦¡± Paper
Applicable Releases: BW 2.0B, 2.1C
May 2001
1 Business Scenario
You would like to transfer the results from a BW Web query to Microsoft Excel
2 The Result
With a button on your Web page you can transfer the content of the page to Microsoft Excel.
The result in Microsoft Excel:
3 The Step By Step Solution
1. Check the settings from your Internet Browser. Call Internet Options from the Tools menu.
2. Mark ¡°Local Intranet¡± in the ¡°Security¡± area and press ¡°Custom Level¡¦¡±.
3. Set the Security Settings.
4. Check out the Web template .
5. Open the Web template.
6. Insert the following coding in your template: <SCRIPT LANGUAGE="JScript"> function bringToExcel() {this.document.execCommand("SelectAll", false); this.document.execCommand("Copy", true); this.document.execCommand("UnSelect", false); // Start Excel and get Application object. var oXL = new ActiveXObject("Excel.Application" oXL.Visible = true; // Get a new workbook. var oWB = oXL.Workbooks.Add(); var oSheet = oWB.ActiveSheet; oSheet.Paste(); oXL.Visible = true; oXL.UserControl = true;} </script>
7. Add the follwing coding for the button to your template: <input type=button value="Download to Excel" onClick="bringToExcel()">
8. Check in the Web Template .
This is a great Jscript, however, it misses the hard part - it only downloads what is currently displayed. What about reports that are divided into Page 1, Page 2, ... Page 10. The real "Download to Excel" button would pull the entire resultset and not just the current screen.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.