I want to import data from excel file using PHP and then if possible, save it to a MySQL database.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Importing from Excel files (XLS) is way harder than improting from CSV files. Usually I save my XLS to CSV with Excel then work on this CSV with PHP…
Look at PHP function fgetcsv at:
http://ca.php.net/manual/en/function.fgetcsv.php
If you still want to load XLS directly from PHP it’s possible (but how reliable)… A quick seach resulted in http://sourceforge.net/projects/phpexcelreader/ which might be helpful.