Don't know why, but your file contains definition for 3712 columns. Here is the xml from sheet1.xml:
<cols> <col min="1" max="1" width="12.42578125" style="22" bestFit="1" customWidth="1"/> <col min="2" max="2" width="9" style="22" bestFit="1" customWidth="1"/> <col min="3" max="3" width="24.140625" style="18" bestFit="1" customWidth="1"/> <col min="4" max="4" width="7.28515625" style="18" bestFit="1" customWidth="1"/> <col min="5" max="5" width="11.42578125" style="18" bestFit="1" customWidth="1"/> ... <col min="16191" max="16191" width="9" style="20" customWidth="1"/> <col min="16192" max="16192" width="11.42578125" style="20" customWidth="1"/> <col min="16193" max="16384" width="11.42578125" style="20"/> </cols> If you give us a hint to to reproduce it in Excel, i.e. how to make Excel write such a big set of columns, then we can research the problem and improve POI. So far we have never seen a .xlsx file with such a huge number of columns. On the POI side the bottleneck is ColumnHelper#addCleanColIntoCols, this method is called for every column being loaded and re-constructs the cols array. This part *may* be improved but only when we have enough reasons to do it - so far your case looks special and caused byu either a bug in Excel or by a weird sequence of user edits. Cheers, Yegor On Wed, Jan 11, 2012 at 1:22 PM, Michael Langhans <[email protected]> wrote: > Hi Nick, > > thanks for the advice with loading the file directly into the OPCPackage. > > As you maybe thought this makes no difference in loading the file. Still > 100% cpu. > > Any other ideas? > > BR, Michael > > schrieb Nick Burch: >> On Tue, 10 Jan 2012, Michael Langhans wrote: >>> I used the following lines for loading: >>> >>> BufferedInputStream fstream = new BufferedInputStream (new >>> FileInputStream(outputFile)); >>> Workbook ourWorkbook = new XSSFWorkbook(OPCPackage.open(fstream)); >> >> I can't offer any advice on the overall problem, but I can point out >> that this code is not ideal. You're much much better off passing the >> file itself to OPCPackage, as that allows for lower memory processing >> >> Nick >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
