5

I am using lucee-spreadsheet, which is a great tool. I am making a very large spreadsheet (multiple sheets in a workbook with thousands of row per sheet). Everything is working as expected. I have populated the sheets with data, and created blank rows in between groups that the client wants. I am now going back and trying to apply some formatting and I am running into the error:

The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook

The problem is that I have only tried to apply one style:

spreadsheet.formatColumns(workbook=workbook, format={dataformat="$##,####0.00"},range='5-20');

There are a number of other styles I need to apply. I am guessing that since there are over 500 rows and this style is being applied to 16 columns that the style is actually formatting each cell and not the column.

Is there a different way that I could be or should be applying this style?

4

2 に答える 2

5

lucee-spreadsheet のソース コードを見ると、formatColumnsフォーマットするすべてのセルに新しいセル スタイルが作成されています。残念ながら、これは最適ではなく、Excel 97 (HSSF) スプレッドシート形式では、スプレッドシートのスタイルに関する Apache POI の制限に達しています。メンテナーがスタイルの再利用を利用するためのより良い機能をformatCellRange実装するまでは、セル スタイルを再利用する を使用することをお勧めします。formatColumns

于 2016-07-13T09:16:33.743 に答える