Conditional formating problem

Topics: Developer Forum
Jan 10, 2011 at 12:52 PM


I've got a problem using conditional formating. I'm using a template (Excel 2007) which contains many ranges of conditional format prepared to show information provided by a database.

The file size is about 20kB when it is created in Excel and is very fast to open. I open it in phpExcel, fills only one cell to test the functionnality and save it in a temporary folder. The result is very strange: The file size is now above 100kB and even Excel has trouble to open it (very slow) and the conditons are not respected.

Could you help me to resolve my problem ?

Thanks for your help !!

Here is the very simple code I use to write in a cell :

include 'Lib/PHPExcel/Classes/PHPExcel.php'; 
include 'Lib/PHPExcel/Classes/PHPExcel/Writer/Excel2007.php'; 
$objReader = new PHPExcel_Reader_Excel2007(); 
$objPHPExcel = $objReader->load("C:/dev/CPNet/Protected/HTMLPage/SemesterEndTools/RecapNotesBase.xlsx");
$objPHPExcel->setActiveSheetIndex(0); $objWorksheet = $objPHPExcel->getActiveSheet(); 
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, "Excel2007"); 
$objWriter-> save('c:/temp/write.xlsx');//"php://output"); 
Jan 10, 2011 at 12:54 PM

One more information : Here is the link to download the Excel file I created :