Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SAP BW Web Explorer - export to Excel

Status
Not open for further replies.

evilbox

IS-IT--Management
Jan 7, 2001
6
GB
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=&quot;JScript&quot;> function bringToExcel() {this.document.execCommand(&quot;SelectAll&quot;, false); this.document.execCommand(&quot;Copy&quot;, true); this.document.execCommand(&quot;UnSelect&quot;, false); // Start Excel and get Application object. var oXL = new ActiveXObject(&quot;Excel.Application&quot;); 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=&quot;Download to Excel&quot; onClick=&quot;bringToExcel()&quot;>
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 &quot;Download to Excel&quot; button would pull the entire resultset and not just the current screen.

Anybody know how to do this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top