Function __global->make_spreadsheet
Definitions
sources/files_spreadsheets_write.php
- Output data to a spreadsheet file.Generally it is better to write row-by-row rather than use this function, for performance reasons.
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: object
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$path | ?PATH | required parameter | N/A | N/A | File to write into (null: create a temporary file and return by reference) |
$data | array | required parameter | N/A | N/A | List of maps, each map representing a row |
$filename | ?ID_TEXT | Null | N/A | N/A | Filename we will be using (null: try and derive from $outfile_path, otherwise generate a .csv filename) |
$metadata | array | [] | N/A | N/A | List of maps, each map representing metadata of a row; supports 'url'; will only be used by file formats that support it |
Return
- A CMS_Spreadsheet_Writer object (pre-closed, you don't need to close it)
- Type: object
- Set: N/A
- Range: N/A