help me the question about percent

Topics: Developer Forum, Project Management Forum, User Forum
Jan 13, 2009 at 8:58 AM

I use this command in my program:

But the problem is that:  Excel can't auto recognize the percentage as the NUMERIC type, instead, it uses as String.
I do not know why.

Can anyone tell me? And how can I solve this problem?

Thank you!


Jan 13, 2009 at 9:31 AM
You will want to do like this:

$objPHPExcel->getActiveSheet()->setCellValueExplicit('A1', 0.0712, PHPExcel_Cell_DataType::TYPE_NUMERIC);

Screen shot: