String format in a cell with data numbers

Topics: Developer Forum
Jun 27, 2013 at 10:35 AM
Hello, I am having problems with a cell which converts a string like this 23123734823493478 (is an bank account) to a number like this 7,85025E+19

How can I apply a style to this cell?

Thanks
Coordinator
Jun 27, 2013 at 10:57 AM
An integer value that large will always be converted to a float (and displayed in scientific format by MS Excel) unless you explicitly set it to be a string using:
$objPHPExcel->getActiveSheet()
    ->setCellValueExplicit('A8', "23123734823493478", PHPExcel_Cell_DataType::TYPE_STRING);
Jun 27, 2013 at 11:05 AM
Ok, thanks for your help!! I am grateful with you!!