RE: [PHP-DB] RE: Excel to MySQL

From: Date: Thu, 18 Oct 2001 12:44:15 +0000
Subject: RE: [PHP-DB] RE: Excel to MySQL
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-13469@lists.php.net to get a copy of this message
You could try the MyODBC driver. On the www.mysql.com website I think. Then you won't need CSV or any other type of import file. Tony > -----Original Message----- > From: Mikusch, Rita [mailto:MIKUSCH@ica.bc.ca] > Sent: Wednesday, October 17, 2001 5:05 PM > To: php-db@lists.php.net > Subject: [PHP-DB] RE: Excel to MySQL > > > I do this fairly often (actually from MSSQL to Access to Excel to MySQL -- > I'm sure there's a shorter route!) > > I convert the Excel file to a tab delimited file. I do run into two > problems: > > a) some of the text entries are surrounded by double quotes and > some aren't > (some kind of Excel weirdness). So I open it up in a text editor > and delete > all the quotes. I use the "programmers file editor" which is > about a zillion > years old, hasn't been updated for years, but deletes those quotes in > milliseconds. > > b) sometimes users enter hard-returns into the text data they > enter into the > windows database (the source of my excel file). This will convert into a > hard return in your tab delimited text file. I run through the > list manually > to find the hard returns and delete them. My list is only 10,000 > long and it > is formatted in such a way that makes these hard returns easy to see! I'm > sure others on the list have a much better way of dealing with this. > > I have an "auto increment" field in my table so I add an > additional numbered > column in Excel and number it appropriately. > > One day when I have time I'll actually find a more efficient way of doing > all this! > > good-luck > rita. > > -----Original Message----- > From: Chris Payne [mailto:chris@planetoxygene.com] > Sent: Tuesday, October 16, 2001 10:58 PM > To: php-db@lists.php.net > Subject: Excel to MySQL > > > Hi there everyone, > > What is the best way to convert an Excel spreadsheet into a MySQL > database? > Should I save it as a comma'd file or is there a better way? If I have to > save it as a comma'd text file, is there anything special I > should do first? > > I would normally enter the data manually on my server, but we are > talking in > excess of 15000+ entries here which is way too many to add manually. > > Thanks for all your help. > > Chris > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.db (#13469) next »