Ilya Sterin wrote: > >Jeff Zucker wrote >> >>With Kawai Takanori's DBD::Excel (on CPAN). > >Yes, but DBD::Excel allows you to query Excel files, not dump them.
Here's a somewhat simple minded patch to DBD::Excel that allows one to
create and populate an Excel file with standard SQL CREATE and INSERT
statements.
=item xl_mode
If xl_mode is set to "write" in the connect() statement, the CREATE and
INSERT statements will be written to file when disconnect() is
explicitly called. For example. this creates a new .xls file and
inserts rows into it:
my $hDb = DBI->connect("dbi:Excel:file=$file;xl_mode=write");
$hDb->do("CREATE TABLE $table (id INTEGER,phrase CHAR(40))");
$hDb->do("INSERT INTO $table VALUES (1,'JAPH')");
$hDb->do("INSERT INTO $table VALUES (2,'Hello World')");
$hDb->disconnect;
--
Jeff
excel.dif
Description: video/dv
