in reply to Spreadsheet::WriteExcel Too Many Formats Problems


Excel has a limit of approximately 4000 different cell formats, as pointed out above.

I'd guess that you probably don't have 4000 unique cell formats in your workbook but instead have a large number of duplicate formats that are being generated by add_format() in a loop.

The solution is to create your main formats as global objects and then reuse them as required rather then creating a new duplicate format each time.

A future release of Spreadsheet::WriteExcel will remove duplicates automatically.

--
John.

  • Comment on Re: Spreadsheet::WriteExcel Too Many Formats Problems