Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- use Spreadsheet::ParseExcel;
- my $ovalue='';
- my $oExcel = new Spreadsheet::ParseExcel;
- die "Fájlnév ?" unless
- @ARGV;
- my $oBook = $oExcel->Parse($ARGV[0]);
- my($iR, $iC, $oWkS, $oWkC);
- for(my $iSheet=0; $iSheet < $oBook->{SheetCount} ; $iSheet++)
- {
- $oWkS = $oBook->{Worksheet}[$iSheet];
- # print "--------- SHEET:", $oWkS->{Name}, "\n";
- for(my $iR = $oWkS->{MinRow} ;
- defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ;
- $iR++)
- {
- $ovalue='';
- for(my $iC = $oWkS->{MinCol} ;
- defined $oWkS->{MaxCol} && $iC <= $oWkS->{MaxCol} ;
- $iC++)
- {
- $oWkC = $oWkS->{Cells}[$iR][$iC];
- $ovalue.=$oWkC->Value.";" if ($oWkC);
- }
- print $ovalue."\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment