Hello, I am using POI 2.0 Pre3 and the associated contrib file.
In my Java application I create a report file from data that was just loaded into the system. I get the results of two SQL queries and I output them to the separate sheets. The first sheet has just a couple of fields and displays summary data. This sheet uses HSSFCellUtil and HSSFRegionUtil for setting some formatting. The second sheet contains a list of errors that were found in the data that was just loaded. This sheet creates a HSSFCellStyle and applies it to all results displayed as well as uses HSSFRegionUtil for setting borders. When using small input data files (< 1 Mb) with a low number of errors, everything output correctly to a 236 kb .xls file. When I use a 7.17 Mb file with a large number of errors in it I get problems. I first had to add "-ms64m -mx256m" to the run line to keep it from running out of memory. Once that was fixed, it was able to create the 7.79 Mb output file (the second sheet contains 48121 rows with 9 columns - all values are strings). When I open it in Excel 2002 (XP), it churns for a bit and displays a dialog box with this in it: --Begin dialog box text-- "Errors were detected in '20006_Report.xls,' but Microsoft Excel was able to open the file by making the repairs listed below. Save the file to make these repairs permanent. "Damage to the file was so extensive that repairs were not possible. Excel attempted to recover your formulas and values, but some data may have been lost or corrupted." --End dialog box text-- It then lets me access the file. All data appears to be there and correct, but none of the formatting is applied to it. If I open the file in OpenOffice 1.1 Spreadsheet, it gives me an alert that the maximum number of row has been exceeded (only a max of 32000 rows allowed?) and the rest would not be loaded. In OpenOffice, though, the formatting is displayed correctly. Is this a problem with Excel and large files or is there something else I need to do when building the sheet? Any help would be very much appreciated. Thank you! Matt ______________________________ Matt Cupp Battelle Memorial Institute Statistics and Data Analysis Systems There are 10 kinds of people in the world; those who understand binary and those who don't. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
