Documentation updates (#2131)
* Update notes in documentation for memory sizing on 32-bit and 64-bit PHP versions * Additional notes on the fact that PHPSpreadsheet does not change cell addresses when loading a spreadsheet using a Read Filter
This commit is contained in:
parent
1d86840429
commit
781b2470f6
|
|
@ -1,6 +1,6 @@
|
|||
# Memory saving
|
||||
|
||||
PhpSpreadsheet uses an average of about 1k per cell in your worksheets, so
|
||||
PhpSpreadsheet uses an average of about 1k per cell (1.6k on 64-bit PHP) in your worksheets, so
|
||||
large workbooks can quickly use up available memory. Cell caching
|
||||
provides a mechanism that allows PhpSpreadsheet to maintain the cell
|
||||
objects in a smaller size of memory, or off-memory (eg: on disk, in APCu,
|
||||
|
|
|
|||
|
|
@ -139,6 +139,11 @@ $reader->setReadFilter( new MyReadFilter() );
|
|||
$spreadsheet = $reader->load("06largescale.xlsx");
|
||||
```
|
||||
|
||||
Read Filtering does not renumber cell rows and columns. If you filter to read only rows 100-200, cells that you read will still be numbered A100-A200, not A1-A101. Cells A1-A99 will not be loaded, but if you then try to call `getCell()` for a cell outside your loaded range, then PHPSpreadsheet will create a new cell with a null value.
|
||||
|
||||
Methods such as `toArray()` assume that all cells in a spreadsheet has been loaded from A1, so will return null values for rows and columns that fall outside your filter range: it is recommended that you keep track of the range that your filter has requested, and use `rangeToArray()` instead.
|
||||
|
||||
|
||||
### \PhpOffice\PhpSpreadsheet\Writer\Xlsx
|
||||
|
||||
#### Writing a spreadsheet
|
||||
|
|
|
|||
|
|
@ -324,6 +324,10 @@ to read and process a large workbook in "chunks": an example of this
|
|||
usage might be when transferring data from an Excel worksheet to a
|
||||
database.
|
||||
|
||||
Read Filtering does not renumber cell rows and columns. If you filter to read only rows 100-200, cells that you read will still be numbered A100-A200, not A1-A101. Cells A1-A99 will not be loaded, but if you then try to call `getCell()` for a cell outside your loaded range, then PHPSpreadsheet will create a new cell with a null value.
|
||||
|
||||
Methods such as `toArray()` assume that all cells in a spreadsheet has been loaded from A1, so will return null values for rows and columns that fall outside your filter range: it is recommended that you keep track of the range that your filter has requested, and use `rangeToArray()` instead.
|
||||
|
||||
```php
|
||||
$inputFileType = 'Xls';
|
||||
$inputFileName = './sampleData/example2.xls';
|
||||
|
|
|
|||
Loading…
Reference in New Issue