How can I insert the data from excel to MYSQL database using the $value returned from statement $value = $objWorksheet->getCellByColumnAndRow($col, $row)->getValue();

Topics: Developer Forum, Project Management Forum, User Forum
Jul 9, 2013 at 9:15 AM
How can I insert the data from excel to MYSQL database using the $value returned from statement $value = $objWorksheet->getCellByColumnAndRow($col, $row)->getValue();

I am able to get the value of entire row in $value. But I need to insert the value into database table. When I try to echo $value[index] eg $value[0], it gives some crap results. But simply printing $value prints the entire row.

Please help me out by giving me an insert query for inserting data into database using $value variable.
Jul 9, 2013 at 9:28 AM
The getCellByColumnAndRow method returns a cell, not a row... Checks in the source file, how the data are distributed. If the problem comes from him, you'll have to cut yourself off the value of the cell.