Solved

Importing Excel spreadsheet into MySQL BBDD

Posted on 2004-09-09
3
401 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]
ID: 12015150
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
ID: 12017069
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
ID: 12026044
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What does "flush tables;" do exactly? 7 100
SQL BACKUP - 2008 R2 8 71
SQL Server - Check Constraint or NOT NULL? 11 86
SYbase 4 32
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
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…

832 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