Solved

Importing Excel spreadsheet into MySQL BBDD

Posted on 2004-09-09
3
397 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Remove duplicate from left join 6 65
Database client version mismatch in PhpMyAdmin 4 67
Cassandra Select Query 1 52
report returning null 21 79
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 …
APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
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…

932 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