I am Importing bulk data from the Excel5 file using the PHPExcel IOFactory classes.
And then Insert every row to the database table.
Issue
When Excel file column have ( ' )single quotes or ( " ) double quotes. While reading that file it convert those special char to something else. And after inserting to database it look like A’ Customer†proper value was A' Customer"
I am Importing bulk data from the Excel5 file using the PHPExcel IOFactory classes. And then Insert every row to the database table.
Issue
When Excel file column have ( ' )single quotes or ( " ) double quotes. While reading that file it convert those special char to something else. And after inserting to database it look like A’ Customer†proper value was A' Customer"
Can anyone help me with this issue.
Code
$inputFileType = 'Excel5'; $inputFileName = "file.xls";
$objReader = PHPExcel_IOFactory::createReader($inputFileType); $objReader->setReadDataOnly(true); $objPHPExcel = $objReader->load($inputFileName);
$sheetData = $objPHPExcel->getActiveSheet()->toArray();
foreach ($sheetData as $data) { ... }