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 .