Hi, I am trying to open an Excel document with multiple sheets using HSSF POI. I have written the code for creating the Workbook and Worksheet in the JSP. However when the JSP is invoked, nothing is displayed. I have attached the JSP. I am creating the Worksheet in the following manner.
response.setContentType("application/vnd.ms-excel");
org.apache.poi.hssf.usermodel.HSSFWorkbook excelDoc = new
org.apache.poi.hssf.usermodel.HSSFWorkbook();
org.apache.poi.hssf.usermodel.HSSFSheet excelSheet =
excelDoc.createSheet(sheetName);
short
rowCount = 0;
org.apache.poi.hssf.usermodel.HSSFRow
excelRow = excelSheet.createRow((short)rowCount);
excelRow.createCell((short)0).setCellValue("Date");
excelRow.createCell((short)1).setCellValue("Time");
excelRow.createCell((short)2).setCellValue("Timezone");
excelRow.createCell((short)3).setCellValue("Called
Number/Email/Network Address");
excelRow.createCell((short)4).setCellValue("Destination");
excelRow.createCell((short)5).setCellValue("Invoice
Text");
excelRow.createCell((short)6).setCellValue("Billed
Qty");
excelRow.createCell((short)7).setCellValue("Volume");
excelRow.createCell((short)8).setCellValue("Total
Charge");
excelRow.createCell((short)9).setCellValue("Time
Band");
excelRow.createCell((short)10).setCellValue("Usage
Category");
excelRow.createCell((short)11).setCellValue("Event
Type Code");
excelRow.createCell((short)12).setCellValue("Event
Sub Type Code");
rowCount++;
Any help will be highly appreciated.
Regards
Nitin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
