nathanvit has asked for the wisdom of the Perl Monks concerning the following question:
use DBI; use strict; use DBD::ODBC; use Spreadsheet::WriteExcel::FromDB; use Spreadsheet::WriteExcel; my $user='intranet'; my $passwd='vittorio'; my $tabella='A_Filiali'; my @campi=qw/CodiceFiliale CittaFiliale Indirizzo Cap NumTel NumFax So +cieta Apertura/; my $file='prova.xls'; my $dbh = DBI->connect('dbi:ODBC:registri',$user, $passwd) or die "Non + riesco a connettermi!!\n"; my $ss = Spreadsheet::WriteExcel::FromDB->read($dbh, $tabella); $ss->include_columns(@campi); open FILE, ">$file" or die "Non riesco ad aprire il file!!\nErrore: $! +\n"; binmode FILE; print FILE $ss->as_xls; close FILE; my $workbook = Spreadsheet::WriteExcel->new($file); my $worksheet=$workbook->sheets(0); $worksheet->set_column(0,0, 30); $workbook->close();
Steve_p - changed title to be more "searchable"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Excel::SpreadSheet : Can't call method "set_column" on an undefined value
by Anonymous Monk on Sep 23, 2004 at 10:23 UTC | |
by nathanvit (Beadle) on Sep 23, 2004 at 10:32 UTC | |
by Anonymous Monk on Sep 23, 2004 at 11:35 UTC | |
Re: Excel::SpreadSheet : Can't call method "set_column" on an undefined value
by jmcnamara (Monsignor) on Sep 23, 2004 at 18:03 UTC |