At 15:21 -0600 6/29/02, Chase wrote:
>Does anyone know of a way that I can export an Excel spreadsheet to 
>a file that I can import to MySQL?  I found a program that will do 
>this for Access, but I would rather leave Access out of this if 
>possible. Thanks!!

Does it have to be written in PHP? :-)

#! /usr/bin/perl -w
# - 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);

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to