PhpSpreadsheet/samples
oleibman db57af0c7f
Fix Chart Problems and Memory Leak in Xlsx Writer (#2930)
This was supposed to be mopping up some longstanding chart issues. But one of the sample files exposed a memory leak in Xlsx Writer, unrelated to charts. Since that is my best sample file for this problem, I would like to fix both problems at the same time.

Xlsx Writer for Worksheets calls getRowDimension for all rows on the sheet. As it happens, the sample file had data in the last rows after a huge gap of rows without any data. It correctly did not write anything for the unused rows. However, the call to getRowDimension actually creates a new RowDimension object if it doesn't already exist, and so it wound up creating over a million totally unneeded objects. This caused it to run out of memory when I tried to make a copy of the 8K input file. The logic is changed to call getRowDimension if and only if (there is data in the row or the RowDimension object already exists). It still has to loop through a million rows, but it no longer allocates the unneeded storage.

As for the Chart problems - fix #1797. This is where the file that caused the memory leak originated. Many of its problems were already resolved by the earlier large set of changes to Charts. However, there were a few new properties that needed to be added to Layout to make things complete - numberFormat code and source-linked, and dLblPos (position for labels); and autoTitleDeleted needs to be added to Charts.

Also fix #2077, by allowing the format to be specified in the Layout rather than the DataSeriesValues constructor.
2022-07-14 08:30:36 -07:00
..
Autofilter Autofilter Part 2 2021-06-24 10:09:21 +02:00
Basic Copy from Xls(x) to Html/Pdf Loses Drawings (#2788) 2022-05-07 08:10:24 -07:00
Calculations Additional unit tests for HLOOKUP() and VLOOKUP() and Examples for VLOOKUP() 2021-05-29 13:35:42 +02:00
Chart Move Gridlines from Chart to Axis (#2923) 2022-07-07 21:48:12 -07:00
ConditionalFormatting Handle the case of an invalid formula by defaulting to ptgInt + 0, which will avoid breaking the file 2022-03-13 10:53:07 +01:00
DefinedNames Make DefinedNames Samples Consistent With Other Samples (#1707) 2020-11-11 11:02:04 +01:00
Pdf Mpdf With Very Many Styles (#2434) 2021-12-07 10:46:21 -08:00
Reader Resolve Scrutinizer Reports for Samples (#2691) 2022-03-21 13:17:25 -07:00
Reading_workbook_data Document Properties - Coverage and 32-bit-safe Timestamps (#2113) 2021-05-30 13:55:58 +02:00
Table Table name as an constructor argument 2022-04-17 17:48:38 +05:30
bootstrap Update Jquery to V3.6 2021-11-24 09:12:46 +09:00
images Special Characters in Image File Name (#2416) 2021-12-06 06:50:09 -08:00
templates Fix Chart Problems and Memory Leak in Xlsx Writer (#2930) 2022-07-14 08:30:36 -07:00
Bootstrap.php Keep sample bootstrap purely in samples 2020-05-17 18:51:13 +09:00
Header.php Keep sample bootstrap purely in samples 2020-05-17 18:51:13 +09:00
favicon.ico Update Jquery to V3.6 2021-11-24 09:12:46 +09:00
index.php Drop PHP 7.2 2021-11-01 12:01:54 +09:00