function _load(TikiSheet &$sheet) { $d = $this->data; foreach ($d->metadata->widths as $c => $width) { } foreach ($d->rows as $r => $row) { foreach ($row->columns as $c => $column) { $sheet->initCell($r, $c); //if cell has formula, use it, otherwise, use value, if value if blank, use '' if (!empty($column->formula)) { $sheet->setCalculation($column->formula); } else { $sheet->setValue(isset($column->value) ? $column->value : ''); } //Make cell able to span multi columns and rows $rowSpan = 1; $colSpan = 1; if (isset($column->rowspan)) { $rowSpan = $column->rowspan; } if (isset($column->colspan)) { $colSpan = $column->colspan; } $sheet->setRowSpan($rowSpan); $sheet->setColSpan($colSpan); $sheet->setDeadCells(); //setup cell css style if (!empty($column->style)) { $sheet->setStyle($column->style); } //setup cell html class if (isset($column->class)) { $sheet->setClass($column->class); } } } return true; }