Link to Content's target Space :
As an alternative for an Excel Export that doesn't require ActiveX check out WebClient UI Export to Spreadsheet with abap2xlsx
Created on: May'11 - 2010
Arun Kumar is a CRM developer working with Accenture India.
Exporting data to a file from web ui is already available in CRM but it is limited to certain file types. For example data cannot be downloaded to an Excel file or Powerpoint presentation. The 'Export to Excel' button available in tableview tag downloads the file as an XML spreadsheet and not to an Excel file.
( Note: I was not able to save the wiki with standard scripting and activex keywords. So i have added the coding as image as per the advice from SDN support)
Download to Excel function:
Create an Excel workbook using acitvexobject and get the reference in a variable 'Excel'. ( I have used AXO to refer active x objects. I cant use the original keyword. )
Add Workbooks to the file. The object reference is passed to a variable'Workbook'.
This reference variable 'Workbook' has a list of properties and methods that can be used to format the Excel file further. These are available in the Microsoft msdn library.
Now we can directly add values to the Excel sheet that is active in the Excel workbook.
This statement writes the value 'Hello' to cell 1:1 of the first sheet in the Excel file.
Adding background color to a range of cells,
This statement adds color from cell A1 to F1.
All formatting options including adding formula to a cell, condition formatting, inserting images etc., can be done using ActiveXObjects.
Finally the Excel file must be made visible.
The file can be saved directly to the user desktop.
Download to PPT
Create a powerpoint application using AXO.
Add Presentations to the application and slides to the presentation. Once the clides are created, add tables to populate the data.
Data can be populated to table cells by referring to the cell location.
Finally the presentation is made visible.
Downloaded Excel file:
Thanks & Regards,