Format cell and open workbook in Excel

Topics: Developer Forum, User Forum
Feb 1, 2012 at 7:59 AM



Im formatting cell as time hh:mm:ss:



If I open workbook in excel and check cell format I get that it is "Custom hh:mm:ss" as it must be. But format applies only after I focus in cell content and press enter.

How can I do that cell format is already applied if I open workbook in Excel?


Thank you in advance


Feb 1, 2012 at 7:52 PM

It should already be correct. Can you create a "test case" worksheet demonstrating this problem and upload it for me to test.

Feb 2, 2012 at 9:18 AM
Edited Feb 2, 2012 at 9:21 AM

I create excel file as following:

$this->excel = new PHPExcel();
$this->excel->setActiveSheetIndex($idx)->setCellValueByColumnAndRow($i, $j, $value);

Result xls file is attached. Also is attached screenshot how opened file looks like.
 Also is attached screenshot after hitting enter in cell - format applies as it should be.