Correct format for strings / numbers beginning with zero?

后端 未结 6 1557
梦谈多话
梦谈多话 2020-12-03 01:31

I\'m trying to use PHP to create a file containing a list of phone numbers. It\'s working OK however if the phone number begins with zero, the digit is dropped from the Exce

6条回答
  •  我在风中等你
    2020-12-03 01:33

    Set the type to string explicitly:

    $type = PHPExcel_Cell_DataType::TYPE_STRING;
    $sheet->getCellByColumnAndRow($column, $rowno)->setValueExplicit($value, $type);
    

提交回复
热议问题