Saving HSSFCellStyle in Excel file
- From: "Ghislain Benrais" <ghislain.benrais@xxxxxxxxxxxxxxxx>
- Date: Wed, 28 Sep 2005 19:27:29 +0200
Hi world,
I'm writing excel files with HSSF libraries and it works very well.
Nevertheless, I think I have misunderstood something about HSSF styles. I'm
afraid they're only available when java is running. Or is it possible to
save them in the excel result, with a nice name, so that the excel user can
modify the applied style ? If could there be a workaround ?
Here is a sample program :
HSSFWorkbook wb = new HSSFWorkbook(); HSSF*** *** =
wb.create***("new ***"); HSSFRow row = ***.createRow((short)0);
HSSFCell cell = row.createCell((short)0); cell.setCellValue(1);
HSSFCellStyle cellStyle = wb.createCellStyle();
cellStyle.setBorderBottom(cellStyle.BORDER_THICK); cell =
row.createCell((short)0); cell.setCellValue(1);
cell.setCellStyle(cellStyle); FileOutputStream fileOut = new
FileOutputStream("workbook.xls"); wb.write(fileOut);
fileOut.close();workbook.xls contains a cell with the expected formatting
properties, but its style is 'normal'.Thanks,Ghislain
.
- Follow-Ups:
- Re: Saving HSSFCellStyle in Excel file
- From: Massimo Dell'Andrea
- Re: Saving HSSFCellStyle in Excel file
- Prev by Date: Re: C++, C# or Java.
- Next by Date: Re: XML configurable formatter/"Pretty Printer"
- Previous by thread: Re: How to configure jakarta-tomcat-connectors-jk2-win32-IIS?
- Next by thread: Re: Saving HSSFCellStyle in Excel file
- Index(es):