Function __global->spreadsheet_open_read
Definitions
sources/files_spreadsheets_read.php
- Open spreadsheet for reading.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $path | PATH | No | No | required parameter | N/A | N/A | File path |
| $filename | ?string | No | No | Null | N/A | N/A | Filename (null: derive from $path) |
| $algorithm | integer | No | No | 3 | N/A | N/A | An ALGORITHM_* constant |
| $trim | boolean | No | No | True | N/A | N/A | Whether to trim each cell |
| $default_charset | ?string | No | No | Blank (empty string) | N/A | N/A | The default character set to assume if none is specified in the file (null: website character set) (blank: smart detection) |
Returns
- A subclass of CMS_Spreadsheet_Reader
- Type: object
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Open spreadsheet for reading.
*
* @param PATH $path File path
* @param ?string $filename Filename (null: derive from $path)
* @param integer $algorithm An ALGORITHM_* constant
* @param boolean $trim Whether to trim each cell
* @param ?string $default_charset The default character set to assume if none is specified in the file (null: website character set) (blank: smart detection)
* @return object A subclass of CMS_Spreadsheet_Reader
*/
function spreadsheet_open_read(string $path, ?string $filename = null, int $algorithm = 3, bool $trim = true, ?string $default_charset = '') : object
* Open spreadsheet for reading.
*
* @param PATH $path File path
* @param ?string $filename Filename (null: derive from $path)
* @param integer $algorithm An ALGORITHM_* constant
* @param boolean $trim Whether to trim each cell
* @param ?string $default_charset The default character set to assume if none is specified in the file (null: website character set) (blank: smart detection)
* @return object A subclass of CMS_Spreadsheet_Reader
*/
function spreadsheet_open_read(string $path, ?string $filename = null, int $algorithm = 3, bool $trim = true, ?string $default_charset = '') : object

