At 3:58 -0800 3/27/02, Thomas Edison Jr. wrote: >How do i import MS Excel Data into MySQL Tables??
One way: save it as a tab-delimited file, then import it with mysqlimport. If you don't want to mess around pointing and clicking to save an Excel file as a tab-delimited file, try using this Perl script: #! /usr/bin/perl -w # from_excel.pl - read Excel spreadsheet, write tab-delimited, # linefeed-terminated output to the standard output. use strict; use Spreadsheet::ParseExcel::Simple; @ARGV or die "Usage: $0 excel-file\n"; my $xls = Spreadsheet::ParseExcel::Simple->read ($ARGV[0]); foreach my $sheet ($xls->sheets ()) { while ($sheet->has_data ()) { my @data = $sheet->next_row (); print join ("\t", @data) . "\n"; } } exit (0); Run it like this: from_excel.pl excel_file.xls > excel_file.txt Spreadsheet::ParseExcel::Simple requires a few other modules that'll need to be installed first. > >T. Edison jr. > > > >===== >Rahul S. Johari (Director) >****************************************** >Abraxas Technologies Inc. >Homepage : http://www.abraxastech.com >Email : [EMAIL PROTECTED] >Tel : 91-4546512/4522124 >******************************************* --------------------------------------------------------------------- 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