/usr/share/doc/libspreadsheet-parseexcel-perl/examples/sample/dmpExH.pl is in libspreadsheet-parseexcel-perl 0.5800-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | use strict;
use Spreadsheet::ParseExcel;
if(!(defined $ARGV[0])) {
print<<EOF;
Usage: $0 Excel_File
EOF
exit;
}
my $iPreSheet=-1;
sub subCellHandler($$$$$) {
my ($oBook, $iSheet, $iRow, $iCol, $oCell) = @_;
if($iPreSheet<0) {
print "=========================================\n";
print "FILE :", $oBook->{File} , "\n";
print "COUNT :", $oBook->{SheetCount} , "\n";
print "AUTHOR:", $oBook->{Author} , "\n";
}
if($iPreSheet != $iSheet) {
print "--------- SHEET:",
$oBook->{Worksheet}[$iSheet]->{Name}, "\n" ;
$iPreSheet = $iSheet;
}
print "( $iRow , $iCol ) =>", $oCell->Value, "\n";
# $oBook->ParseAbort('Exceed Data') if($iRow >= 1);
}
my $oExcel = new Spreadsheet::ParseExcel
( CellHandler => \&subCellHandler, NotSetCell => 1);
my $oBook = $oExcel->Parse($ARGV[0]);
print "ABORTED:", $oBook->{_ParseAbort} if($oBook->{_ParseAbort});
|