require_once 'Spreadsheet/Excel/Writer.php';
$workbook = new Spreadsheet_Excel_Writer('formula.xls');
$worksheet =& $workbook->addWorksheet();
$worksheet->write(0, 0, 2);
$worksheet->write(0, 1, "and");
$worksheet->write(0, 2, 2);
$worksheet->write(0, 3, "makes");
$worksheet->writeFormula(0, 4, "=SUM(A1,C1)");
$workbook->close(); |