<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl

use strict;
use Spreadsheet::ParseExcel;
use Spreadsheet::ParseExcel::FmtJapan2;
if(!(defined $ARGV[0])) {
    print&lt;&lt;EOF;
Usage: $0 Excel_File
EOF
    exit;
}
my $iPreSheet=-1;
sub subCellHandler($$$$$) {
    my ($oBook, $iSheet, $iRow, $iCol, $oCell) = @_;
    if($iPreSheet&lt;0) {
        print "=========================================\n";
        print "FILE  :", $oBook-&gt;{File} , "\n";
        print "COUNT :", $oBook-&gt;{SheetCount} , "\n";
        print "AUTHOR:", $oBook-&gt;{Author} , "\n";
    }
    if($iPreSheet != $iSheet) {
        print "--------- SHEET:", 
            $oBook-&gt;{Worksheet}[$iSheet]-&gt;{Name}, "\n" ;
        $iPreSheet = $iSheet;
    }
    print "( $iRow , $iCol ) =&gt;", $oCell-&gt;Value, "\n";
#    $oBook-&gt;ParseAbort('Exceed Data') if($iRow &gt;= 1);
}
my $oExcel = new Spreadsheet::ParseExcel
        ( CellHandler =&gt; \&amp;subCellHandler, NotSetCell =&gt; 1);
my $oFmtJ = Spreadsheet::ParseExcel::FmtJapan2-&gt;new(Code =&gt; $ARGV[1]);
my $oBook = $oExcel-&gt;Parse($ARGV[0], $oFmtJ);
for(my $i=0;$i&lt;$oBook-&gt;{SheetCount};$i++) {
    print "LAST:\n";
    print "Row:", $oBook-&gt;{Worksheet}[$i]-&gt;{MaxRow}, "\n";  
    print "Col:", $oBook-&gt;{Worksheet}[$i]-&gt;{MaxCol}, "\n";  
}
print "ABORTED:", $oBook-&gt;{_ParseAbort} if($oBook-&gt;{_ParseAbort});
</pre></body></html>