Jump to content

Can You Import an Excel File to a MySQL Database using phpMyAdmin?


$Three3

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.