How can I export my ID card to EXCEL in scientific notation? I used PHPExcelClasses to export MYSQL data to EXCEL as follows, but when it is an ID card, it becomes a scientific notation. Is there any way to set the EXCEL field of the ID card number to text in advance, to display the ID card normally? Set_include_path (get_include_path (). & quot; & quot mysql export ID card to EXCEL as scientific notation. what should I do?
I used PHPExcelClasses to export MYSQL data to EXCEL as follows, but when it is an ID card, it becomes a scientific notation. Is there any way to set the EXCEL field of the ID card number to text in advance, to display the ID card normally?
Set_include_path (get_include_path (). ";". '../Common/PHPExcelClasses /');
Include 'phpexcel. php ';
// Or include 'phpexcel/Writer/excel2007.php ';
Include 'phpexcel/Writer/excel5.php'; // used for output. xls
// Create an excel file
$ ObjPHPExcel = new PHPExcel ();
// Save the excel-2007 format
// $ ObjWriter = new PHPExcel_Writer_Excel2007 ($ objPHPExcel );
// $ ObjWriter-> setOffice2003Compatibility (true );
$ ObjWriter = new PHPExcel_Writer_Excel5 ($ objPHPExcel );/
$ ObjPHPExcel-> setActiveSheetIndex (0 );
$ ObjPHPExcel-> getActiveSheet ()-> setCellValue ('A1', 'Student number ');
$ ObjPHPExcel-> getActiveSheet ()-> setCellValue ('b1 ', 'ID card no ');
..............................
$ ObjWriter-> save ("info.xls ");
------ Solution --------------------
Use string type
------ Solution --------------------
The exported values are converted into characters by adding spaces in the symbol table.
------ Solution --------------------
Add a half-width single quotation mark before the exported value
------ Solution --------------------
Discussion
I cannot add any symbols before my ID card. what do I mean on the first floor? how can I use it?