It is actually a little tricky. You need to build the table in mysql yourself, then
use some utility to import it. I would use perl. The problem with Excel is that when
it exports csv, it does not quote empty fields (I think), So, you can't use
Text::ParseWords (AFAIK). Here is a regexp which will do the pattern matching for you
(courtesy of the O'Reilly Regular Expressions book):
@info = ();
while ($data =~ m/"([^"\\]*(\\.[^"\\]*)*)",?|([^,]+),?|,/g) {
push(@info, defined($1) ? $1 : $3 ); }
push(@info,undef) if $data=~ m/,$/;
Then, just use DBI to get the data into MySQL.
Hope this helps.
-Dan
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php