I would like to request a feature that will force WorkbookDesigner.setDatasource/process and/or Cells.importXYZ to not exceed the max. number of rows allowed on an Excel Worksheet. Obviously, the API would required the FileFormatType so Aspose.Cells could determine if the max is 65536 rows or 1048576 rows.
Right now I am "emulating" this kind of functinality using a custom AsposeDataTable and a wrapper class for java.sql.ResultSet that allows me to set a "stop" record number, but its not a clean work around.
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thank you for considering Aspose.
We have registered your required feature in our internal issue tracking system with issue id CELLSJAVA-13448. We will look into the feasibility of the feature and get back to you soon.
For
Cells.importResultSet(...) methods, I think you can use:
int
com.aspose.cells.Cells.importResultSet(ResultSet rs, int rowIndex, int
columnIndex, int rowNum, int columnNum, boolean isFieldNameShown, String
customDateFormatString, boolean convertStringToNumber)
to
limit the number of rows to be imported.
To determine the maximum row count specified by FileFormatType, we will look
into it later and try to provide a solution in later versions. Currently, we
only limit the imported rows not to get exceeded to 1048576 rows by default. However, if
you save the workbook as Excel97-2003 file format, we will not save those rows
that are exceeded to 65536 into the file to make the generated xls file a valid file.
A similar setDatasource method should be added to WorkbookDesigner class. The existing setDatasource that has a "int cacheLimit" which isn't the same as "don't go past row # 65000".
For example, a worksheet will be populated by 3 large resultsets of unknown size, but probably 10,000 to 30,000 records each. So resultsets #1 and 2 will always fit on the spreadsheet. However, if the file is saved in the Excel 2003 format the data from resultset #3 will sometimes get cut off. This isn't desirable, because the data is lost and it presents an incorrect picture to the user. It would be preferrable to make sure WorkbookDesigner stopped at a specific row #. The programmer could have logic that would try to put the remaining ResultSet #3 data on a new worksheet.