Example #1
0
                $cell = $this->_phpSheet->getCell($columnString . ($row + 1));
                $cell->setValueExplicit($this->_sst[$index]['value'], PHPExcel_Cell_DataType::TYPE_STRING);
            }
            if (!$this->_readDataOnly) {
                // add style information
                $cell->setXfIndex($this->_mapCellXfIndex[$xfIndex]);
            }
        }
    }
    /**
	 * Read MULRK record
	 * This record represents a cell range containing RK value
	 * cells. All cells are located in the same row.
	 *
	 * --	"OpenOffice.org's Documentation of the Microsoft
	 * 		Excel File Format"
	 */
    private function _readMulRk()
    {
        $length = self::_GetInt2d($this->_data, $this->_pos + 2);
        $recordData = substr($this->_data, $this->_pos + 4, $length);
        // move stream pointer to next record
        $this->_pos += 4 + $length;
        // offset: 0; size: 2; index to row
        $row = self::_GetInt2d($recordData, 0);
        // offset: 2; size: 2; index to first column
        $colFirst = self::_GetInt2d($recordData, 2);
        // offset: var; size: 2; index to last column
        $colLast = self::_GetInt2d($recordData, $length - 2);
        $columns = $colLast - $colFirst + 1;
        // offset within record data
        $offset = 4;
        for ($i = 0; $i < $columns; ++$i) {
            $columnString = PHPExcel_Cell::stringFromColumnIndex($colFirst + $i);
            // Read cell?
            if (!is_null($this->getReadFilter()) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->_phpSheet->getTitle())) {
                // offset: var; size: 2; index to XF record