Update Worksheet.php
Supporting *writing* formulas in XLSX files is truly trivial.
This commit is contained in:
parent
1d38fca715
commit
8ac86cb254
@ -212,8 +212,10 @@ EOD;
|
||||
$columnIndex = CellHelper::getCellIndexFromColumnIndex($cellNumber);
|
||||
$cellXML = '<c r="' . $columnIndex . $rowIndex . '"';
|
||||
$cellXML .= ' s="' . $styleId . '"';
|
||||
|
||||
if (CellHelper::isNonEmptyString($cellValue)) {
|
||||
|
||||
if (CellHelper::isFormulaString($cellValue)) {
|
||||
$cellXML .= '><f>'.substr($cellValue,1).'</f><v>0</v></c>'; // seriously, that's it.
|
||||
} else if (CellHelper::isNonEmptyString($cellValue)) {
|
||||
$cellXML .= $this->getCellXMLFragmentForNonEmptyString($cellValue);
|
||||
} else if (CellHelper::isBoolean($cellValue)) {
|
||||
$cellXML .= ' t="b"><v>' . intval($cellValue) . '</v></c>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user