$Three3 Posted June 4, 2010 Share Posted June 4, 2010 Can You Import an Excel File to a MySQL Database using phpMyAdmin? I am looking to buy this database that has the data of all Colleges and Universities in the US. The file is in Excel format. Can this be imported into phpMyAdmin? Here is the site where I am going to buy the database from if this is possible: http://www.data-lists.com/universities-colleges-database.html?gclid=CPGXkN6H6aECFeQc5wodBFPRIg You can download a sample of the database that has 10 entries. I have tried importing this into phpMyAdmin but this is the error I am getting: There is a chance that you may have found a bug in the SQL parser. Please examine your query closely, and check that the quotes are correct and not mis-matched. Other possible failure causes may be that you are uploading a file with binary outside of a quoted text area. You can also try your query on the MySQL command line interface. The MySQL server error output below, if there is any, may also help you in diagnosing the problem. If you still have problems or if the parser fails where the command line interface succeeds, please reduce your SQL query input to the single query that causes problems, and submit a bug report with the data chunk in the CUT section below: ----BEGIN CUT---- eNrtXAtsHMd5nt177R0FipQoiXqvICkiJd7xnnwJBnWiqFdIiubRjyQO5NVxSV51vGPuIYltVNNt CgS1azhSIre20sBNXLRp2jSOm9iIW8stYLcA3RZtmodjN3Zgp3FdtLWbokVg+/rPzO7evnkXyYna zhyHd/PvzP/N/PPP7Mw+vtGpqVNTQ+JITByJi2OjE0NiTIyLqYFkNBnKTMOR9lAoczuI95yYGRLL H8svSqWyXIrkc2cii/OLYiyWiiXEeDQ6EIa/+IAY6xuK9Q+lEh8W8/LCoLgnNL6UuXVsSExFopH+ And then at the bottom of the error it says: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ÐÏࡱá' at line 1 Any help is greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/203870-can-you-import-an-excel-file-to-a-mysql-database-using-phpmyadmin/ Share on other sites More sharing options...
gwolgamott Posted June 4, 2010 Share Posted June 4, 2010 Not sure, but you could convert the file to an xml spreadsheet. Then you could load an xml file with a script to be useful with php. Or could hunt down and find some various php classes to handle excel files if you don't want to write something yourself. Link to comment https://forums.phpfreaks.com/topic/203870-can-you-import-an-excel-file-to-a-mysql-database-using-phpmyadmin/#findComment-1067751 Share on other sites More sharing options...
kenrbnsn Posted June 4, 2010 Share Posted June 4, 2010 An Excel spreadsheet is a proprietary Microsoft format and not very portable. phpMyAdmin needs it's input in either CSV or SQL formats. I would ask the providers of this data if they can provide it is a more portable format like CSV. Ken Link to comment https://forums.phpfreaks.com/topic/203870-can-you-import-an-excel-file-to-a-mysql-database-using-phpmyadmin/#findComment-1067759 Share on other sites More sharing options...
micah1701 Posted June 4, 2010 Share Posted June 4, 2010 per kenrbnsn point, just take the excel file they give you and resave them as CSV or Tab-Delimited files. Link to comment https://forums.phpfreaks.com/topic/203870-can-you-import-an-excel-file-to-a-mysql-database-using-phpmyadmin/#findComment-1067777 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.