Solved

Importing Excel spreadsheet into MySQL BBDD

Posted on 2004-09-09
3
390 Views
Last Modified: 2012-05-05
Hi!

i need to insert an excel spreadsheet into mysql BBDD. Is there any kind of script or web app to automatically upload file, and then insert all the stuff into BBDD? Is another way better?

Thx in advance!
0
Comment
Question by:morsa801tons
3 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
You cannot load Excel File directly into MySQL, you need to convert it to csv first, see here for an example:
http://lists.mysql.com/mysql/168567

To automate it, you need to automate the SaveAs function, which should not be too difficult to implement by using the Macro Recorder :-)
Note that you can run a Macro from M$Office from command line, if you need help to locate it, drop a line here.

There is no "better" way, unless you start writing a full-blown macro or other language, reading the excel sheet data, connect to the MySQL database and update the data as needed...

CHeers
0
 

Expert Comment

by:w003rpb
Comment Utility
One thing that may also work would be to import the file into Access then take it from Access into Crystal.  I have used this option several times and it has worked great for me.  
Good Luck!
Ryan
0
 
LVL 7

Accepted Solution

by:
Bruce Cadiz earned 250 total points
Comment Utility
morsa801tons,

The Excel-to-MySQL product says it can do this for around $30.00. It appears to have a command line options so it could potencially be incorporated in a server side script / cgi program. Hope this helps.
i.e.
mysql.exe --host=... --user=... --password=... -vvf {MySQL database name} < {dump file name}

Product page
http://www.convert-in.com/xls2sql.htm

Free Trial download
http://www.convert-in.com/demos/xls2sqld.exe


Good luck.
Bruce
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now