Solved

Importing Excel spreadsheet into MySQL BBDD

Posted on 2004-09-09
3
405 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 143

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

707 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