Excel 97 ?

Topics: User Forum
Mar 31, 2010 at 3:50 PM

It looks like the PHPExcel_Writer_Excel5 class will support writing Excel 95 (BIFF5) format, but although the documentation makes it appear to support Excel 97 / BIFF8 format, I'm not finding anything about how to create the writer in the documentation so that it will use that format.  Am I just missing something?

 

Developer
Apr 5, 2010 at 12:27 PM

PHPExcel_Writer_Excel5 has evolved from PEAR::Spreadsheet_Excel_Writer.

PEAR::Spreadsheet_Excel_Writer originally saved as Excel 95 (BIFF5), but was later modified to provide a switch setVersion(8) so it could save as Excel 97 / BIFF8.

We have not offered any such switch in PHPExcel_Writer_Excel5. But if you locate this line in PHPExcel\Writer\Excel5.php

 

$this->_BIFF_version    = 0x0600;

and change it to this

 

$this->_BIFF_version    = 0x0500;

Then it should in theory generate BIFF5. Result could be buggy and less feature-rich.

Since you are the first one to ask such question I'm not sure whether we should provide a switch.

Maybe you can explain why you would like BIFF5?