A class for reading Microsoft Excel Spreadsheets.
Originally developed by Vadim Tkachenko under the name PHPExcelReader. (http://sourceforge.net/projects/phpexcelreader) Based on the Java version by Andy Khan (http://www.andykhan.com). Now maintained by David Sanders. Reads only Biff 7 and Biff 8 formats.
| category | Spreadsheet |
|---|---|
| package | Spreadsheet_Excel_Reader |
| author | Vadim Tkachenko |
| copyright | 1997-2005 The PHP Group |
| license | PHP License 3.0 |
| version | Release: @package_version@ |
| link | http://pear.php.net/package/PackageName |
| see | Spreadsheet_Excel_Writer |
Spreadsheet_Excel_Reader()
Some basic initialisation
_GetIEEE754($rknum)
_GetInt4d($data, $pos)
_encodeUTF16($string)
_parse() : boolean
| access | private |
|---|
boolean_parsesheet(\todo $spos)
| access | private |
|---|---|
| todo | fix return codes |
\todo
addcell($row, $col, $string, $raw = '')
createDate(integer $numValue) : array
Dates in Excel are stored as number of seconds from an epoch. On Windows, the epoch is 30/12/1899 and on Mac it's 01/01/1904
| access | private |
|---|
integerThe raw Excel value to convert
arrayFirst element is the converted date, the second element is number a unix timestampcreateNumber($spos)
isDate(\todo $spos) : boolean
\todo
booleanTrue if date, false otherwiseread(\filename $sFileName)
| access | public |
|---|---|
| todo | return a valid value |
\filename
setColumnFormat(integer $column, string $sFormat)
| access | public |
|---|
integerColumn number
stringFormat
setDefaultFormat(\Default $sFormat)
| access | public |
|---|
\Defaultformat
setOutputEncoding(string $encoding)
| access | public |
|---|
stringEncoding to use
setRowColOffset(\offset $iOffset)
| access | public |
|---|
\offset
setUTFEncoder(string $encoder = 'iconv')
| access | public |
|---|
stringEncoding type to use. Either 'iconv' or 'mb'
$_coloffset : integer
1| access | private |
|---|
$_columnsFormat : array
array()| access | private |
|---|
$_defaultEncoding : string
| access | private |
|---|
$_defaultFormat : integer
SPREADSHEET_EXCEL_READER_DEF_NUM_FORMAT| access | private |
|---|
$_ole : \OLE
| access | private |
|---|
$_rowoffset : integer
1| access | private |
|---|
$boundsheets : array
array()| access | public |
|---|
$data : string
| access | public |
|---|
$dateFormats : array
array(14 => "d/m/Y", 15 => "d-M-Y", 16 => "d-M", 17 => "M-Y", 18 => "h:i a", 19 => "h:i:s a", 20 => "H:i", 21 => "H:i:s", 22 => "d/m/Y H:i", 45 => "i:s", 46 => "H:i:s", 47 => "i:s.S")| access | public |
|---|
$formatRecords : array
array()| access | public |
|---|
$numberFormats : array
array(1 => "%1.0f", 2 => "%1.2f", 3 => "%1.0f", 4 => "%1.2f", 5 => "%1.0f", 6 => '$%1.0f', 7 => '$%1.2f', 8 => '$%1.2f', 9 => '%1.0f%%', 10 => '%1.2f%%', 11 => '%1.2f', 37 => '%1.0f', 38 => '%1.0f', 39 => '%1.2f', 40 => '%1.2f', 41 => '%1.0f', 42 => '$%1.0f', 43 => '%1.2f', 44 => '$%1.2f', 48 => '%1.0f')| access | public |
|---|
$sheets : array
array()The data is stored in 'cells' and the meta-data is stored in an array called 'cellsInfo'
Example:
$sheets --> 'cells' --> row --> column --> Interpreted value --> 'cellsInfo' --> row --> column --> 'type' - Can be 'date', 'number', or 'unknown' --> 'raw' - The raw data that Excel stores for that data cell
| access | public |
|---|
$sst : array
array()| access | public |
|---|