|
@@ 3447-3480 (lines=34) @@
|
| 3444 |
|
* -- "OpenOffice.org's Documentation of the Microsoft |
| 3445 |
|
* Excel File Format" |
| 3446 |
|
*/ |
| 3447 |
|
private function _readRk() |
| 3448 |
|
{ |
| 3449 |
|
$length = self::_GetInt2d($this->_data, $this->_pos + 2); |
| 3450 |
|
$recordData = substr($this->_data, $this->_pos + 4, $length); |
| 3451 |
|
|
| 3452 |
|
// move stream pointer to next record |
| 3453 |
|
$this->_pos += 4 + $length; |
| 3454 |
|
|
| 3455 |
|
// offset: 0; size: 2; index to row |
| 3456 |
|
$row = self::_GetInt2d($recordData, 0); |
| 3457 |
|
|
| 3458 |
|
// offset: 2; size: 2; index to column |
| 3459 |
|
$column = self::_GetInt2d($recordData, 2); |
| 3460 |
|
$columnString = PHPExcel_Cell::stringFromColumnIndex($column); |
| 3461 |
|
|
| 3462 |
|
// Read cell? |
| 3463 |
|
if (($this->getReadFilter() !== NULL) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->_phpSheet->getTitle()) ) { |
| 3464 |
|
// offset: 4; size: 2; index to XF record |
| 3465 |
|
$xfIndex = self::_GetInt2d($recordData, 4); |
| 3466 |
|
|
| 3467 |
|
// offset: 6; size: 4; RK value |
| 3468 |
|
$rknum = self::_GetInt4d($recordData, 6); |
| 3469 |
|
$numValue = self::_GetIEEE754($rknum); |
| 3470 |
|
|
| 3471 |
|
$cell = $this->_phpSheet->getCell($columnString . ($row + 1)); |
| 3472 |
|
if (!$this->_readDataOnly) { |
| 3473 |
|
// add style information |
| 3474 |
|
$cell->setXfIndex($this->_mapCellXfIndex[$xfIndex]); |
| 3475 |
|
} |
| 3476 |
|
|
| 3477 |
|
// add cell |
| 3478 |
|
$cell->setValueExplicit($numValue, PHPExcel_Cell_DataType::TYPE_NUMERIC); |
| 3479 |
|
} |
| 3480 |
|
} |
| 3481 |
|
|
| 3482 |
|
|
| 3483 |
|
/** |
|
@@ 3625-3656 (lines=32) @@
|
| 3622 |
|
* -- "OpenOffice.org's Documentation of the Microsoft |
| 3623 |
|
* Excel File Format" |
| 3624 |
|
*/ |
| 3625 |
|
private function _readNumber() |
| 3626 |
|
{ |
| 3627 |
|
$length = self::_GetInt2d($this->_data, $this->_pos + 2); |
| 3628 |
|
$recordData = substr($this->_data, $this->_pos + 4, $length); |
| 3629 |
|
|
| 3630 |
|
// move stream pointer to next record |
| 3631 |
|
$this->_pos += 4 + $length; |
| 3632 |
|
|
| 3633 |
|
// offset: 0; size: 2; index to row |
| 3634 |
|
$row = self::_GetInt2d($recordData, 0); |
| 3635 |
|
|
| 3636 |
|
// offset: 2; size 2; index to column |
| 3637 |
|
$column = self::_GetInt2d($recordData, 2); |
| 3638 |
|
$columnString = PHPExcel_Cell::stringFromColumnIndex($column); |
| 3639 |
|
|
| 3640 |
|
// Read cell? |
| 3641 |
|
if (($this->getReadFilter() !== NULL) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->_phpSheet->getTitle()) ) { |
| 3642 |
|
// offset 4; size: 2; index to XF record |
| 3643 |
|
$xfIndex = self::_GetInt2d($recordData, 4); |
| 3644 |
|
|
| 3645 |
|
$numValue = self::_extractNumber(substr($recordData, 6, 8)); |
| 3646 |
|
|
| 3647 |
|
$cell = $this->_phpSheet->getCell($columnString . ($row + 1)); |
| 3648 |
|
if (!$this->_readDataOnly) { |
| 3649 |
|
// add cell style |
| 3650 |
|
$cell->setXfIndex($this->_mapCellXfIndex[$xfIndex]); |
| 3651 |
|
} |
| 3652 |
|
|
| 3653 |
|
// add cell value |
| 3654 |
|
$cell->setValueExplicit($numValue, PHPExcel_Cell_DataType::TYPE_NUMERIC); |
| 3655 |
|
} |
| 3656 |
|
} |
| 3657 |
|
|
| 3658 |
|
|
| 3659 |
|
/** |