String format in a cell with data numbers

Topics: Developer Forum
Jun 27, 2013 at 11: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?

Jun 27, 2013 at 11: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:
    ->setCellValueExplicit('A8', "23123734823493478", PHPExcel_Cell_DataType::TYPE_STRING);
Jun 27, 2013 at 12:05 PM
Ok, thanks for your help!! I am grateful with you!!