Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /usr/share/doc/perl-Spreadsheet-ParseExcel/sample/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/doc/perl-Spreadsheet-ParseExcel/sample/dmpExH.pl
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});

Hry