How can I export my ID card to EXCEL in scientific notation?

Source: Internet
Author: User
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 normally display the ID card mysql export the ID card to EXCEL as a 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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.