ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct () | |
Create a new CSV Reader instance. More... | |
setInputEncoding (string $pValue) | |
getInputEncoding () | |
setFallbackEncoding (string $pValue) | |
getFallbackEncoding () | |
listWorksheetInfo (string $pFilename) | |
Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns). More... | |
load ($pFilename) | |
Loads Spreadsheet from file. More... | |
loadIntoExisting (string $pFilename, Spreadsheet $spreadsheet) | |
Loads PhpSpreadsheet from file into PhpSpreadsheet instance. More... | |
getDelimiter () | |
setDelimiter (string $delimiter) | |
getEnclosure () | |
setEnclosure (string $enclosure) | |
getSheetIndex () | |
setSheetIndex (int $pValue) | |
setContiguous (bool $contiguous) | |
getContiguous () | |
setEscapeCharacter (string $escapeCharacter) | |
getEscapeCharacter () | |
canRead ($pFilename) | |
Can the current IReader read the file? More... | |
Public Member Functions inherited from PhpOffice\PhpSpreadsheet\Reader\BaseReader | |
__construct () | |
IReader constructor. More... | |
getReadDataOnly () | |
Read data only? If this is true, then the Reader will only read data values for cells, it will not read any formatting information. More... | |
setReadDataOnly ($pValue) | |
Set read data only Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting information. More... | |
getReadEmptyCells () | |
Read empty cells? If this is true (the default), then the Reader will read data values for all cells, irrespective of value. More... | |
setReadEmptyCells ($pValue) | |
Set read empty cells Set to true (the default) to advise the Reader read data values for all cells, irrespective of value. More... | |
getIncludeCharts () | |
Read charts in workbook? If this is true, then the Reader will include any charts that exist in the workbook. More... | |
setIncludeCharts ($pValue) | |
Set read charts in workbook Set to true, to advise the Reader to include any charts that exist in the workbook. More... | |
getLoadSheetsOnly () | |
Get which sheets to load Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null indicating that all worksheets in the workbook should be loaded. More... | |
setLoadSheetsOnly ($value) | |
Set which sheets to load. More... | |
setLoadAllSheets () | |
Set all sheets to load Tells the Reader to load all worksheets from the workbook. More... | |
getReadFilter () | |
Read filter. More... | |
setReadFilter (IReadFilter $pValue) | |
Set read filter. More... | |
getSecurityScanner () | |
Static Public Member Functions | |
static | setConstructorCallback (?callable $callback) |
Set a callback to change the defaults. More... | |
static | getConstructorCallback () |
static | guessEncoding (string $filename, string $dflt=self::DEFAULT_FALLBACK_ENCODING) |
Data Fields | |
const | DEFAULT_FALLBACK_ENCODING = 'CP1252' |
const | GUESS_ENCODING = 'guess' |
const | UTF8_BOM = "\xEF\xBB\xBF" |
const | UTF8_BOM_LEN = 3 |
const | UTF16BE_BOM = "\xfe\xff" |
const | UTF16BE_BOM_LEN = 2 |
const | UTF16BE_LF = "\x00\x0a" |
const | UTF16LE_BOM = "\xff\xfe" |
const | UTF16LE_BOM_LEN = 2 |
const | UTF16LE_LF = "\x0a\x00" |
const | UTF32BE_BOM = "\x00\x00\xfe\xff" |
const | UTF32BE_BOM_LEN = 4 |
const | UTF32BE_LF = "\x00\x00\x00\x0a" |
const | UTF32LE_BOM = "\xff\xfe\x00\x00" |
const | UTF32LE_BOM_LEN = 4 |
const | UTF32LE_LF = "\x0a\x00\x00\x00" |
Protected Member Functions | |
skipBOM () | |
Move filepointer past any BOM marker. More... | |
checkSeparator () | |
Identify any separator that is explicitly set in the file. More... | |
inferSeparator () | |
Infer the separator if it isn't explicitly set in the file or specified by the user. More... | |
Protected Member Functions inherited from PhpOffice\PhpSpreadsheet\Reader\BaseReader | |
openFile ($pFilename) | |
Open file for reading. More... | |
Private Member Functions | |
openFileOrMemory (string $pFilename) | |
Static Private Member Functions | |
static | extractStringLower ($extension) |
Scrutinizer believes, incorrectly, that the specific pathinfo call in canRead can return something other than an array. More... | |
static | guessEncodingTestNoBom (string &$encoding, string &$contents, string $compare, string $setEncoding) |
static | guessEncodingNoBom (string $filename) |
static | guessEncodingTestBom (string &$encoding, string $first4, string $compare, string $setEncoding) |
static | guessEncodingBom (string $filename) |
Private Attributes | |
$inputEncoding = 'UTF-8' | |
$fallbackEncoding = self::DEFAULT_FALLBACK_ENCODING | |
$delimiter | |
$enclosure = '"' | |
$sheetIndex = 0 | |
$contiguous = false | |
$escapeCharacter = '\\' | |
Static Private Attributes | |
static | $constructorCallback |
Additional Inherited Members | |
Protected Attributes inherited from PhpOffice\PhpSpreadsheet\Reader\BaseReader | |
$readDataOnly = false | |
$readEmptyCells = true | |
$includeCharts = false | |
$loadSheetsOnly | |
$readFilter | |
$fileHandle | |
$securityScanner | |
PhpOffice\PhpSpreadsheet\Reader\Csv::__construct | ( | ) |
Create a new CSV Reader instance.
Implements PhpOffice\PhpSpreadsheet\Reader\IReader.
PhpOffice\PhpSpreadsheet\Reader\Csv::canRead | ( | $pFilename | ) |
Can the current IReader read the file?
string | $pFilename |
Implements PhpOffice\PhpSpreadsheet\Reader\IReader.
Definition at line 418 of file Csv.php.
References $type, and PhpOffice\PhpSpreadsheet\Reader\BaseReader\openFile().
Referenced by PhpOffice\PhpSpreadsheet\Reader\Csv\openFileOrMemory().
|
protected |
Identify any separator that is explicitly set in the file.
Definition at line 153 of file Csv.php.
References PhpOffice\PhpSpreadsheet\Reader\Csv\skipBOM().
Referenced by PhpOffice\PhpSpreadsheet\Reader\Csv\listWorksheetInfo(), and PhpOffice\PhpSpreadsheet\Reader\Csv\loadIntoExisting().
|
staticprivate |
Scrutinizer believes, incorrectly, that the specific pathinfo call in canRead can return something other than an array.
Phpstan knows better. This function satisfies both.
mixed | $extension |
|
static |
PhpOffice\PhpSpreadsheet\Reader\Csv::getContiguous | ( | ) |
PhpOffice\PhpSpreadsheet\Reader\Csv::getDelimiter | ( | ) |
PhpOffice\PhpSpreadsheet\Reader\Csv::getEnclosure | ( | ) |
PhpOffice\PhpSpreadsheet\Reader\Csv::getEscapeCharacter | ( | ) |
Definition at line 393 of file Csv.php.
References PhpOffice\PhpSpreadsheet\Reader\Csv\$escapeCharacter.
PhpOffice\PhpSpreadsheet\Reader\Csv::getFallbackEncoding | ( | ) |
Definition at line 133 of file Csv.php.
References PhpOffice\PhpSpreadsheet\Reader\Csv\$fallbackEncoding.
PhpOffice\PhpSpreadsheet\Reader\Csv::getInputEncoding | ( | ) |
Definition at line 121 of file Csv.php.
References PhpOffice\PhpSpreadsheet\Reader\Csv\$inputEncoding.
PhpOffice\PhpSpreadsheet\Reader\Csv::getSheetIndex | ( | ) |
|
static |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
protected |
Infer the separator if it isn't explicitly set in the file or specified by the user.
Definition at line 172 of file Csv.php.
References PhpOffice\PhpSpreadsheet\Reader\Csv\skipBOM().
Referenced by PhpOffice\PhpSpreadsheet\Reader\Csv\listWorksheetInfo(), and PhpOffice\PhpSpreadsheet\Reader\Csv\loadIntoExisting().
PhpOffice\PhpSpreadsheet\Reader\Csv::listWorksheetInfo | ( | string | $pFilename | ) |
Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns).
Definition at line 201 of file Csv.php.
References PhpOffice\PhpSpreadsheet\Reader\BaseReader\$fileHandle, PhpOffice\PhpSpreadsheet\Reader\Csv\checkSeparator(), PhpOffice\PhpSpreadsheet\Reader\Csv\inferSeparator(), PhpOffice\PhpSpreadsheet\Reader\Csv\openFileOrMemory(), PhpOffice\PhpSpreadsheet\Reader\Csv\skipBOM(), and PhpOffice\PhpSpreadsheet\Cell\Coordinate\stringFromColumnIndex().
PhpOffice\PhpSpreadsheet\Reader\Csv::load | ( | $pFilename | ) |
Loads Spreadsheet from file.
string | $pFilename |
Implements PhpOffice\PhpSpreadsheet\Reader\IReader.
Definition at line 243 of file Csv.php.
References PhpOffice\PhpSpreadsheet\Reader\Csv\loadIntoExisting().
PhpOffice\PhpSpreadsheet\Reader\Csv::loadIntoExisting | ( | string | $pFilename, |
Spreadsheet | $spreadsheet | ||
) |
Loads PhpSpreadsheet from file into PhpSpreadsheet instance.
Definition at line 278 of file Csv.php.
References PhpOffice\PhpSpreadsheet\Reader\BaseReader\$fileHandle, PhpOffice\PhpSpreadsheet\Reader\Csv\$sheetIndex, PhpOffice\PhpSpreadsheet\Reader\Csv\checkSeparator(), PhpOffice\PhpSpreadsheet\Spreadsheet\createSheet(), PhpOffice\PhpSpreadsheet\Spreadsheet\getSheetCount(), PhpOffice\PhpSpreadsheet\Reader\Csv\inferSeparator(), PhpOffice\PhpSpreadsheet\Reader\Csv\openFileOrMemory(), PhpOffice\PhpSpreadsheet\Spreadsheet\setActiveSheetIndex(), and PhpOffice\PhpSpreadsheet\Reader\Csv\skipBOM().
Referenced by PhpOffice\PhpSpreadsheet\Reader\Csv\load().
|
private |
Definition at line 252 of file Csv.php.
References $data, PhpOffice\PhpSpreadsheet\Reader\Csv\canRead(), PhpOffice\PhpSpreadsheet\Shared\StringHelper\convertEncoding(), PhpOffice\PhpSpreadsheet\Reader\BaseReader\openFile(), and PhpOffice\PhpSpreadsheet\Reader\Csv\skipBOM().
Referenced by PhpOffice\PhpSpreadsheet\Reader\Csv\listWorksheetInfo(), and PhpOffice\PhpSpreadsheet\Reader\Csv\loadIntoExisting().
|
static |
PhpOffice\PhpSpreadsheet\Reader\Csv::setContiguous | ( | bool | $contiguous | ) |
PhpOffice\PhpSpreadsheet\Reader\Csv::setDelimiter | ( | string | $delimiter | ) |
PhpOffice\PhpSpreadsheet\Reader\Csv::setEnclosure | ( | string | $enclosure | ) |
PhpOffice\PhpSpreadsheet\Reader\Csv::setEscapeCharacter | ( | string | $escapeCharacter | ) |
Definition at line 386 of file Csv.php.
References PhpOffice\PhpSpreadsheet\Reader\Csv\$escapeCharacter.
PhpOffice\PhpSpreadsheet\Reader\Csv::setFallbackEncoding | ( | string | $pValue | ) |
PhpOffice\PhpSpreadsheet\Reader\Csv::setInputEncoding | ( | string | $pValue | ) |
PhpOffice\PhpSpreadsheet\Reader\Csv::setSheetIndex | ( | int | $pValue | ) |
|
protected |
Move filepointer past any BOM marker.
Definition at line 141 of file Csv.php.
Referenced by PhpOffice\PhpSpreadsheet\Reader\Csv\checkSeparator(), PhpOffice\PhpSpreadsheet\Reader\Csv\inferSeparator(), PhpOffice\PhpSpreadsheet\Reader\Csv\listWorksheetInfo(), PhpOffice\PhpSpreadsheet\Reader\Csv\loadIntoExisting(), and PhpOffice\PhpSpreadsheet\Reader\Csv\openFileOrMemory().
|
staticprivate |
|
private |
Definition at line 70 of file Csv.php.
Referenced by PhpOffice\PhpSpreadsheet\Reader\Csv\getContiguous().
|
private |
Definition at line 49 of file Csv.php.
Referenced by PhpOffice\PhpSpreadsheet\Reader\Csv\getDelimiter(), and PhpOffice\PhpSpreadsheet\Reader\Csv\setDelimiter().
|
private |
Definition at line 56 of file Csv.php.
Referenced by PhpOffice\PhpSpreadsheet\Reader\Csv\getEnclosure(), and PhpOffice\PhpSpreadsheet\Reader\Csv\setEnclosure().
|
private |
Definition at line 77 of file Csv.php.
Referenced by PhpOffice\PhpSpreadsheet\Reader\Csv\getEscapeCharacter(), and PhpOffice\PhpSpreadsheet\Reader\Csv\setEscapeCharacter().
|
private |
Definition at line 42 of file Csv.php.
Referenced by PhpOffice\PhpSpreadsheet\Reader\Csv\getFallbackEncoding().
|
private |
Definition at line 35 of file Csv.php.
Referenced by PhpOffice\PhpSpreadsheet\Reader\Csv\getInputEncoding().
|
private |
Definition at line 63 of file Csv.php.
Referenced by PhpOffice\PhpSpreadsheet\Reader\Csv\getSheetIndex(), and PhpOffice\PhpSpreadsheet\Reader\Csv\loadIntoExisting().
const PhpOffice\PhpSpreadsheet\Reader\Csv::DEFAULT_FALLBACK_ENCODING = 'CP1252' |
const PhpOffice\PhpSpreadsheet\Reader\Csv::GUESS_ENCODING = 'guess' |
const PhpOffice\PhpSpreadsheet\Reader\Csv::UTF16BE_BOM = "\xfe\xff" |
const PhpOffice\PhpSpreadsheet\Reader\Csv::UTF16BE_BOM_LEN = 2 |
const PhpOffice\PhpSpreadsheet\Reader\Csv::UTF16BE_LF = "\x00\x0a" |
const PhpOffice\PhpSpreadsheet\Reader\Csv::UTF16LE_BOM = "\xff\xfe" |
const PhpOffice\PhpSpreadsheet\Reader\Csv::UTF16LE_BOM_LEN = 2 |
const PhpOffice\PhpSpreadsheet\Reader\Csv::UTF16LE_LF = "\x0a\x00" |
const PhpOffice\PhpSpreadsheet\Reader\Csv::UTF32BE_BOM = "\x00\x00\xfe\xff" |
const PhpOffice\PhpSpreadsheet\Reader\Csv::UTF32BE_BOM_LEN = 4 |
const PhpOffice\PhpSpreadsheet\Reader\Csv::UTF32BE_LF = "\x00\x00\x00\x0a" |
const PhpOffice\PhpSpreadsheet\Reader\Csv::UTF32LE_BOM = "\xff\xfe\x00\x00" |
const PhpOffice\PhpSpreadsheet\Reader\Csv::UTF32LE_BOM_LEN = 4 |
const PhpOffice\PhpSpreadsheet\Reader\Csv::UTF32LE_LF = "\x0a\x00\x00\x00" |
const PhpOffice\PhpSpreadsheet\Reader\Csv::UTF8_BOM = "\xEF\xBB\xBF" |