tags:

views:

29

answers:

1

Is it posible using Excel_spreadsheet_writer to create a name such as

$workbook  = new Spreadsheet_Excel_Writer();
$worksheet = &$workbook->addWorksheet('CheckNames');

$worksheet->writeName(0, 0, 'AnswerToEverythig', '42');

$worksheet->write(0, 1, 'Double =');

$worksheet->writeFormula(0, 2, '=AnswerToEverythig * 2');

$workbook->send('CheckNames.xls');
$workbook->close();

and dispay 84 in cell C1

As recommended by cypher I've tried PHPExcel but now get Internal Server Error on the following

$prices_sheet->setCellValueByColumnAndRow(4, $row, '=IF(Round_Up=0,  (C'.$row.'+D'.$row.'),  0.01  )');

changing the formula to

'=IF(0=0,  (C'.$row.'+D'.$row.'),  0.01  )'

stops the error.

Therefore PHPExcel has problems resolving formulas using named ranges.

Found This http://phpexcel.codeplex.com/Thread/View.aspx?ThreadId=209472

+1  A: 

I'm not sure how about SpreadSheetExcelWriter, but it certainly can be done with PHPExcel. I've been using PHPExcel for a long time and I can only recommend it.

cypher
Not a solution to the problem but PHPExcel seems to be the better choice
john Griffiths