Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file: prova.pl
- use DBI;
- use DBD::ODBC;
- use strict;
- use Spreadsheet::WriteExcel::FromDB::Query;
- my $dbh = DBI->connect('dbi:ODBC:prova', 'root', 'prova'); { RaiseError => 1, odbc_cursortype => 2};
- my $sth = $dbh->prepare("SELECT * FROM tabella1");
- $sth->execute;
- my $ss = Spreadsheet::WriteExcel::FromDB->read($dbh, $sth);
- print $ss->as_xls;
- my @row;
- while ( my @row = $sth->fetchrow_array ) {
- print "@row\n";
- }
- Errore:
- C:\Perl\prova>perl prova.pl
- Set up gcc environment - 3.4.5 (mingw-vista special r3)
- Spreadsheet::WriteExcel::Simple defines neither package nor VERSION--version check failed at C:/Perl/lib/Spreadsheet/WriteExcel/FromDB.pm line 7.
- BEGIN failed--compilation aborted at C:/Perl/lib/Spreadsheet/WriteExcel/FromDB.pm line 7.
- Compilation failed in require at C:/Perl/lib/Spreadsheet/WriteExcel/FromDB/Query.pm line 8.
- BEGIN failed--compilation aborted at C:/Perl/lib/Spreadsheet/WriteExcel/FromDB/Query.pm line 8.
- Compilation failed in require at prova.pl line 4.
- BEGIN failed--compilation aborted at prova.pl line 4.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement