cancel
Showing results for 
Search instead for 
Did you mean: 

MS excel from portal table

Former Member
0 Kudos

Dear All,

My requirement is as follows:

Based on dynamically selecting the record in the table, we need to generate the MS excel template from portal with few Header rows/columns marked as readonly. Please suggest the sol with the relavant code ?

Thanks,

mano

Accepted Solutions (0)

Answers (2)

Answers (2)

pradeep_kumar5
Active Participant
0 Kudos

Hi Mano,

You can use Apache POI API instead of jxl.jar. There are many advantages of using Apache POI than jxl.jar

  1. Perhaps the most significant difference is that Java JXL does not support the Excel 2007+ ".xlsx" format; it only supports the old BIFF (binary) ".xls" format. Apache POI supports both with a common design.
  2. The Java portion of the JXL API was last updated in 2009 (more than 3 years back ), although it looks like there is a C# API. Apache POI is actively maintained.
  3. JXL doesn't support richtext formatting, i.e. different formatting within a text string; Apache POI does support it.
  4. Apache POI has a more extensive set of documentation and examples available than JXL.

If you want to use it in WDJ follow the below links. I hope this will helps you.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d01854fd-1579-2c10-63ad-dd62edca2...

Regards,

Pradeep

rohit_j
Participant
0 Kudos

Hi Pradeep,

Isn't Apache POI little heavier considering the use case mentioned by Mano? You can refer to the link below.

http://stackoverflow.com/questions/8963474/performance-comparison-between-jxl-and-poi-for-excel-file...

Best Regards,

Rohit

pradeep_kumar5
Active Participant
0 Kudos

Hi Rohit,

Mano may use Jxl or Apache API's it's all depends on their requirement. Initially we too tried jxl API in our project after that project scope is increased and client wants other extra features so we changed to Apache API that'swhy i suggested Mano to use the Apache API.

Regards,

Pradeep

rohit_j
Participant
0 Kudos

Hi Mano,

You can use jxl.jar in a library project and use the API in WDJ to achieve this. You can create a new WorkBook(excel template) using this API with the required headers.

You can find the documentation in Workbook.

Best Regards,

Rohit