If you already used this, the next problem will be when you'll try to render the report pages in the Excel sheets. You could consult the virtualizer sample to find out more about the subject. To save memory space, you have to create this object using a virtualizer (JRFileVirtualizer or JRSwapFileVirtualizer) which uses a swapping mechanism. It can be caused when you create the JasperPrint object, which in this case is a really huge one. The second problem: the "Out of memory" issue. IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS to true. In addition, to gain more usable rows, you can set also the The "Too many rows" exception gets solved only by setting, as you did, IS_ONE_PAGE_PER_SHEET to true.
ThanksPost edited by: longbeach751, at: 6 15:42
#Get number of rows in a excel java jxl how to#
I am not sure it is going to make any difference.īasically, i have something like 75 000 rows to extract from the database and integrate in my Excel file, and I am facing 2 big problems:ĭoes anyone know how to deal with these 2 problems ? I made an attempt with the JRFileVirtualizer class, it adds big chunks of swap files to my filesystem, i am still running it, for almost an hour, i already have like 1GB of swap files and it is increasing of course. So, as you can see, both parameters you talked about are set up to the appropriate value.Īlso, I have a memory problem.
tParameter(JExcelApiExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE) ĮtParameter(JExcelApiExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE) ĮtParameter(JExcelApiExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.TRUE) ĮtParameter(JExcelApiExporterParameter.SHEET_NAMES, arraySheetsName) ĮtParameter(JExcelApiExporterParameter.IS_AUTO_DETECT_CELL_TYPE, fautoDetectCellType)