How can we generate Excel file?

My Problem is, We need to generate an excel file whose columns are dynamic which is depend on the field template name. Using template name we are fetching data which will become the column of the excel sheet, and one template can generate around 150- 250 columns of the excel sheet . Out of 150-250 columns we need to populate values of around 10 columns rest of the columns of the excel sheet would be blank.

For Example :- Let say for a Template name, we are fetching 10 columns from database [Employee Name, Employee iD, C, Street Name, City, Zip, G, H, I and J] and we need to populate only some of the field like Employee Name Employee ID, StreetNM, City and Zip rest other columns are Blank.

Please let me know you if you need more information on this.

If you the solution of this problem please provide me the Step by process to achieve it using Webmethods 7.1.2.

can you use CSV file? since it’s easy to generate in WM and also readable by excel.

You can use Apache POI for this purpose in Java services.

http://poi.apache.org/