Guest User

Untitled

a guest
Sep 11th, 2012
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.72 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. use Spreadsheet::ParseExcel;
  5. my $ovalue='';
  6. my $oExcel = new Spreadsheet::ParseExcel;
  7.  
  8. die "Fájlnév ?" unless
  9. @ARGV;
  10.  
  11. my $oBook = $oExcel->Parse($ARGV[0]);
  12. my($iR, $iC, $oWkS, $oWkC);
  13. for(my $iSheet=0; $iSheet < $oBook->{SheetCount} ; $iSheet++)
  14. {
  15.  $oWkS = $oBook->{Worksheet}[$iSheet];
  16. # print "--------- SHEET:", $oWkS->{Name}, "\n";
  17.  for(my $iR = $oWkS->{MinRow} ;
  18.      defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ;
  19.      $iR++)
  20.  {
  21.   $ovalue='';
  22.   for(my $iC = $oWkS->{MinCol} ;
  23.       defined $oWkS->{MaxCol} && $iC <= $oWkS->{MaxCol} ;
  24.       $iC++)
  25.   {
  26.      $oWkC = $oWkS->{Cells}[$iR][$iC];
  27.      $ovalue.=$oWkC->Value.";" if ($oWkC);
  28.   }
  29.    print $ovalue."\n";
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment