getProperties() and Excel5

Topics: Developer Forum, Project Management Forum, User Forum
Apr 14, 2009 at 2:34 PM
Hello. Is there any ways to set workbook properties (like setCreator(), setTitle(), setDescription() and others) with Excel5?

I run 14excel5.php that includes 05featuredemo.inc.php. It creates PHPExcel object and saves it in Excel5 format. Everything is OK but there are no properties. It seems like that fields are empty.

I have created a simple example and got the same result.


$objPHPExcel = new PHPExcel();

$objPHPExcel->getProperties()->setCreator("Maarten Balliauw");
$objPHPExcel->getProperties()->setLastModifiedBy("Maarten Balliauw");
$objPHPExcel->getProperties()->setTitle("Office 2007 XLSX Test Document");
$objPHPExcel->getProperties()->setSubject("Office 2007 XLSX Test Document");
$objPHPExcel->getProperties()->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.");
$objPHPExcel->getProperties()->setKeywords("office 2007 openxml php");
$objPHPExcel->getProperties()->setCategory("Test result file");

$objPHPExcel->setActiveSheetIndex(0);
$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Hello');
$objPHPExcel->getActiveSheet()->setCellValue('B1', 'world');

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));


p.s. there is probably a misprint after the form of creating new discussion.
"Send me an email me when someone posts a reply". I think the second "me" is unnecessary

Developer
Apr 15, 2009 at 6:18 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Developer
Apr 15, 2009 at 6:28 AM
Work item for typo forwarded to CodePlex team:
http://codeplex.codeplex.com/WorkItem/View.aspx?WorkItemId=22051