Can i set type of cell?

Topics: Developer Forum, Project Management Forum, User Forum
Jun 12, 2008 at 11:36 AM
I want set type of cell is Text in exel file.

I written code below:
    $this->objPHPExcel->getActiveSheet()->getCell('T'.($i+2))->setValueExplicit(' '.$data['runtime'], PHPExcel_Cell_DataType::TYPE_STRING );

After create exel file. Open it, Type of cell is General.

Help me!
Jun 12, 2008 at 2:17 PM
PHPExcel_Cell_DataType::TYPE_STRING is a means to tell Excel that the cell contains "string" data.
"General" referes to style info, check the style info on the cell to change the display type.