Ejemplo n.º 1
0
 /**
  * generate worksheet relations, especially for hyperlinks at the moment.
  *
  * @param Sheet $oSheet
  *
  * @return string
  */
 protected function worksheetRelationsXml(Sheet &$oSheet)
 {
     $sXml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' . '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">';
     foreach ($this->aHyperlinks[$oSheet->getIdentifier()] as $sLink => $iNum) {
         $sXml .= '<Relationship Id="rId' . $iNum . '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="' . $sLink . '" TargetMode="External"/>';
     }
     return $sXml . '</Relationships>';
 }
Ejemplo n.º 2
0
 /**
  * returns a value for sheet cell by given workbook, sheet, row number and
  * column number. possible values are integers, floats, doubles and strings.
  * An Excel function like "=SUM(A1:A4)" will also provided as string.
  *
  * @param Workbook $oWorkbook
  * @param Sheet $oSheet
  * @param integer $iRow
  * @param integer $iColumn
  *
  * @return string|float|double|int
  */
 public function valueForRowAndColumn(Workbook $oWorkbook, Sheet $oSheet, $iRow, $iColumn)
 {
     if (!isset($this->aData[$oSheet->getIdentifier()][$iRow][$iColumn])) {
         return null;
     }
     return $this->aData[$oSheet->getIdentifier()][$iRow][$iColumn];
 }