Date: 06/29/02
- Next message: CrossWalkCentral: "[PHP-DB] NEW help finding sum or average"
- Previous message: Jen Swofford: "RE: [PHP-DB] Excel to MySQL??"
- In reply to: Chase: "[PHP-DB] Excel to MySQL??"
- Next in thread: Manuel Lemos: "[PHP-DB] Re: Excel to MySQL??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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!!
>
>Chase
Does it have to be written in PHP? :-)
#! /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;
<email protected> 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 <email protected> = $sheet->next_row ();
print join ("\t", <email protected>) . "\n";
}
}
exit (0);
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: CrossWalkCentral: "[PHP-DB] NEW help finding sum or average"
- Previous message: Jen Swofford: "RE: [PHP-DB] Excel to MySQL??"
- In reply to: Chase: "[PHP-DB] Excel to MySQL??"
- Next in thread: Manuel Lemos: "[PHP-DB] Re: Excel to MySQL??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

