If you have the Max Binaries of MySQL, do the following: 1) Export Excel Data to a CSV file (mydata.csv) 2) Goto MySQL and create table, without indexes to accept the data (CREATE TABLE myImportCSV) 3) Change the table layout to accept CSV i.e., ALTER TABLE myImport ENGINE = CSV; Please note that CSV tables in MySQL do not support indexes. At this point myImport.csv in the datadir of MySQL is a zero-length file. 4) Goto datadir of MySQL installation and put the contents of mydata.csv into myImport.csv. 5) Run this SQL statement: ALTER TABLE myImport ENGINE = MyISAM; 6) Create any necessary indexes for the MyISAM table myImport.
If you do not have Max Binaries, I hope you have Microsoft Access. Then, you can try the following: 1) Download MyODBC onto your PC and install it. 2) Goto Administrative Tasks and goto 32-bit ODBC in Control Panel 3) Set up ODBC entry to point to your MySQL database of choice 4) Goto Microsoft Access and create a new table. 5) Create a link table entry to the Excel spreadsheet 6) Create a link table entry to MySQL table Make sure the MySQL userid and password has full rights to insert data Make sure the MySQL table has a primary key. If it does not have one, make one. Microsoft Access requires all outside databases (i.e., MySQL, Oracle, SQL Server, etc) to have a primary key. 7) Create an Append Query to the MySQL table from the Excel Spreadsheet. If you do not have Microsoft Access, here is a last resort: 1) Export Spreadsheet Pipe Delimited to myImport.txt 2) Create a table to load on MySQL (with indexes if necessary) 3) Use LOAD DATA INFILE if myImport.txt is to be on the server or LOAD DATA LOCAL INFILE if myImport.txt is loaded from your PC Note: If using LOAD DATA LOCAL INFILE, make sure you use forward slashes i.e., C:/data/myImport.txt I hope this helps !!! ----- Original Message ----- From: Roberto William Aranda-W Roman <[EMAIL PROTECTED]> To: MySQL List <[email protected]> Sent: Wednesday, October 18, 2006 8:36:41 AM GMT-0500 US/Eastern Subject: excel and Mysql?! hello . anybody knows how to export from excel to mysql in order to create or fill a database table?? tanks for your help and patience cheers -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
