Import from Excel to MySQL Database using SQuirrel

I have an Excel spreadsheet with several thousand records. I want to import a table into a MySQL 4 database (this is what I'm given). I am using SQuirrel to GUI access to a database that is hosted remotely.

Is there a way to load columns from a spreadsheet (which I can name according to the column names in the database table) into the database without copying the contents of the generated CSV file from that table? That is, can I run a LOAD command on a local file instructing it to load the contents into a remote database and what are the possible implications for this?

Please note, there is an auto-generated field in the table for assigning IDs to new values, and I want to make sure I don't override this ID as it is the primary key in the table (as well as other compound keys).

+1


source to share


2 answers


If you only have a few thousand records in the spreadsheet, then you shouldn't have any performance issues (unless each row is very large, of course).

You may have problems with some Excel data for example. currency, it's best to try and see what happens.



After rereading your question, you will have to export Excel to a text file that is stored locally. But there should be no problem uploading the local file to the remote MySQL database. Not sure if you can do this with Squirrel, you will need MySQL command line access to run the LOAD command.

The best way to do this is to use Navicat if you have the budget to complete your purchase?

+1


source


I made this tool where you can paste the contents of an Excel file and it creates a create table and inserts instructions that you can just run. (I'm assuming squirrel allows the SQL script to run?)



If you try, please let me know if it works for you.

+1


source







All Articles