Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Requirement

A couple of days ago there was a about excel export for WD! in Web Dynpro Forum to translate table data to Excel file. The quick answer was to refer to Web Dynpro Binary Cache. However, the requirement was to change font of header, change the colour of the cell etc.. Basically to have an MS-Excel sheet, rather than using the conventional approach of translating data to XML Format or CSV Format.Therefore our toExcelUsingXML() or toExcelUsingCSV() approach will not help in this case.

There are Assessment for Excel Solutions in Java to do this. I used the jexcelapi which enables us to achieve this.

Pre-Requisites

  1. Web Dynpro Binary Cache

Setup

  • Download the file JExcelAPI
  • Add it to the library path

    Step 1

    Right Click on Properties



    Step 2

    Add the jar file to your project



  • Make sure you also add the jxl.jar file to the library as well

Implementation

wdDoInit

getCachedWebResource

Context Variables

Create a variable ExcelUrl in the context. This variable will hold the location of the Excel sheet

Output

Output Page

Excel sheet

For more information regarding formatting refer the tutorial available with jexcelapi.

18 Comments