Properties

$_readDataOnly

$_readDataOnly : bool

Read data only? Identifies whether the Reader should only read data values for cells, and ignore any formatting information; or whether it should read both data and formatting

Type

bool

$_includeCharts

$_includeCharts : bool

Read charts that are defined in the workbook? Identifies whether the Reader should read the definitions for any charts that exist in the workbook;

Type

bool

$_loadSheetsOnly

$_loadSheetsOnly : array

Restrict which sheets should be loaded? This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded.

Type

array — of string

$_fileHandle

$_fileHandle

$_inputEncoding

$_inputEncoding : string

Input encoding

Type

string

$_delimiter

$_delimiter : string

Delimiter

Type

string

$_enclosure

$_enclosure : string

Enclosure

Type

string

$_lineEnding

$_lineEnding : string

Line ending

Type

string

$_sheetIndex

$_sheetIndex : int

Sheet index to read

Type

int

$_contiguous

$_contiguous : int

Load rows contiguously

Type

int

$_contiguousRow

$_contiguousRow : int

Row counter for loading rows contiguously

Type

int

Methods

getReadDataOnly()

getReadDataOnly() : bool

Read data only? If this is true, then the Reader will only read data values for cells, it will not read any formatting information.

If false (the default) it will read data and formatting.

Returns

bool —

setReadDataOnly()

setReadDataOnly(bool  $pValue = FALSE) : \PHPExcel_Reader_IReader

Set read data only Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting information.

Set to false (the default) to advise the Reader to read both data and formatting for cells.

Parameters

bool $pValue

Returns

\PHPExcel_Reader_IReader —

getIncludeCharts()

getIncludeCharts() : bool

Read charts in workbook? If this is true, then the Reader will include any charts that exist in the workbook.

Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value. If false (the default) it will ignore any charts defined in the workbook file.

Returns

bool —

setIncludeCharts()

setIncludeCharts(bool  $pValue = FALSE) : \PHPExcel_Reader_IReader

Set read charts in workbook Set to true, to advise the Reader to include any charts that exist in the workbook.

Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value. Set to false (the default) to discard charts.

Parameters

bool $pValue

Returns

\PHPExcel_Reader_IReader —

getLoadSheetsOnly()

getLoadSheetsOnly() : mixed

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.

Returns

mixed —

setLoadSheetsOnly()

setLoadSheetsOnly(mixed  $value = NULL) : \PHPExcel_Reader_IReader

Set which sheets to load

Parameters

mixed $value

This should be either an array of worksheet names to be loaded, or a string containing a single worksheet name. If NULL, then it tells the Reader to read all worksheets in the workbook

Returns

\PHPExcel_Reader_IReader —

setLoadAllSheets()

setLoadAllSheets() : \PHPExcel_Reader_IReader

Set all sheets to load Tells the Reader to load all worksheets from the workbook.

Returns

\PHPExcel_Reader_IReader —

getReadFilter()

getReadFilter() : \PHPExcel_Reader_IReadFilter

Read filter

Returns

\PHPExcel_Reader_IReadFilter —

setReadFilter()

setReadFilter(\PHPExcel_Reader_IReadFilter  $pValue) : \PHPExcel_Reader_IReader

Set read filter

Parameters

\PHPExcel_Reader_IReadFilter $pValue

Returns

\PHPExcel_Reader_IReader —

canRead()

canRead(string  $pFilename) : bool

Can the current PHPExcel_Reader_IReader read the file?

Parameters

string $pFilename

Throws

\PHPExcel_Reader_Exception

Returns

bool —

__construct()

__construct() : mixed

Create a new PHPExcel_Reader_CSV

Returns

mixed —

setInputEncoding()

setInputEncoding(string  $pValue = 'UTF-8') : mixed

Set input encoding

Parameters

string $pValue

Input encoding

Returns

mixed —

getInputEncoding()

getInputEncoding() : string

Get input encoding

Returns

string —

listWorksheetInfo()

listWorksheetInfo(string  $pFilename) : mixed

Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns)

Parameters

string $pFilename

Throws

\PHPExcel_Reader_Exception

Returns

mixed —

load()

load(string  $pFilename) : \PHPExcel

Loads PHPExcel from file

Parameters

string $pFilename

Throws

\PHPExcel_Reader_Exception

Returns

\PHPExcel —

loadIntoExisting()

loadIntoExisting(string  $pFilename, \PHPExcel  $objPHPExcel) : \PHPExcel

Loads PHPExcel from file into PHPExcel instance

Parameters

string $pFilename
\PHPExcel $objPHPExcel

Throws

\PHPExcel_Reader_Exception

Returns

\PHPExcel —

getDelimiter()

getDelimiter() : string

Get delimiter

Returns

string —

setDelimiter()

setDelimiter(string  $pValue = ',') : \PHPExcel_Reader_CSV

Set delimiter

Parameters

string $pValue

Delimiter, defaults to ,

Returns

\PHPExcel_Reader_CSV —

getEnclosure()

getEnclosure() : string

Get enclosure

Returns

string —

setEnclosure()

setEnclosure(string  $pValue = '"') : \PHPExcel_Reader_CSV

Set enclosure

Parameters

string $pValue

Enclosure, defaults to "

Returns

\PHPExcel_Reader_CSV —

getLineEnding()

getLineEnding() : string

Get line ending

Returns

string —

setLineEnding()

setLineEnding(string  $pValue = PHP_EOL) : \PHPExcel_Reader_CSV

Set line ending

Parameters

string $pValue

Line ending, defaults to OS line ending (PHP_EOL)

Returns

\PHPExcel_Reader_CSV —

getSheetIndex()

getSheetIndex() : int

Get sheet index

Returns

int —

setSheetIndex()

setSheetIndex(int  $pValue) : \PHPExcel_Reader_CSV

Set sheet index

Parameters

int $pValue

Sheet index

Returns

\PHPExcel_Reader_CSV —

setContiguous()

setContiguous(bool  $contiguous = FALSE) : mixed

Set Contiguous

Parameters

bool $contiguous

Returns

mixed —

getContiguous()

getContiguous() : bool

Get Contiguous

Returns

bool —

_openFile()

_openFile(string  $pFilename) : resource

Open file for reading

Parameters

string $pFilename

Throws

\PHPExcel_Reader_Exception

Returns

resource —

_isValidFormat()

_isValidFormat() : bool

Validate that the current file is a CSV file

Returns

bool —

_skipBOM()

_skipBOM() : mixed

Move filepointer past any BOM marker

Returns

mixed —