Convert ODS to XLS using PHPExcel

Aug 22, 2012 at 10:06 AM

Hey,

I want to use PHPExcel to convert an ods-file to a xls-file.

Basically it works - but the output doesn't have any formatting any more...

Am I doing it wrong? That is the way I tried it:

 

    $objPHPExcel = new PHPExcel();
    $objReader = new PHPExcel_Reader_OOCalc();
    $objPHPExcel = $objReader->load('files/yearly_calendar.ods');

    $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, "Excel5");
    $objWriter->save('tmp/converted.xls');

 

I would be happy for any ideas/hints!

 

Regards :)

 

Coordinator
Aug 22, 2012 at 11:51 AM

The OOCalc reader only supports data and basic number format masks, not the full range of style settings until I find the time to add it

Aug 24, 2012 at 10:54 AM

Thanks for your answer :)

I will look for another solution for my problem, although PHPExcel would have fit my requirements perfectly..

Coordinator
Aug 24, 2012 at 6:21 PM

If I ever find the time to do it... OOCalc styles is on the TO DO list, but a day still only has 24-hours