![]() WritableCell getCell(int col, int row, T arg) ĮxcelCellGeneratorFactory.java: import jxl.write. ![]() ![]() ![]() Here is the code, with exception handling simplified, other data types omitted and probably some imports missing:ĮxcelCellGenerator.java: import Is there any reason that using same format object for different sheets or workbooks fails? Later this excel sheet can be sent to client side using proper http response header information. If I create a new object for date format instead of using static field, everything is fine. With the proper integration of this API and the server side backend data layer, we can transform the fetched data into an excel sheet. But I have problems with Date format - the first call works good, but in all consecutive exports date cells have numeric format instead of date format. WritableCellFormat bodyText new WritableCellFormat(workbook, WritableWorkbook. To minimize object creation cell formats are created as static fields and reused in consecutive calls to export. The API should be changed so that the constructors require as an argument the workbook they relate to, or the constructors should be private and the fonts and formats should be obtained from the workbook. I created a wrapper to jExcelApi classes to easily export lists of objects to Excel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |