captionColA captionColB captionColC
http://abc.com 3 abc
http://www.xyz.com 4 xyz
foo.bar 5 fb
####
pl_test>perl 827414.pl
http://abc.com
http://www.xyz.com
foo.bar
Use of uninitialized value in foreach loop entry at 827414.pl line 12.
Use of uninitialized value in foreach loop entry at 827414.pl line 12.
Argument "" isn't numeric in numeric gt (>) at 827414.pl line 14.
Use of uninitialized value in foreach loop entry at 827414.pl line 12.
Use of uninitialized value in foreach loop entry at 827414.pl line 12.
Argument "" isn't numeric in numeric gt (>) at 827414.pl line 14.
pl_test>
####
#!/usr/bin/perl
use strict;
use warnings;
# id: 827414
use Spreadsheet::ParseExcel;
my $excel = Spreadsheet::ParseExcel::Workbook->Parse("au.xls");
my $excel_file_url;
#start looping the Excel sheet
for my $sheet (@{$excel->{Worksheet}}) {
$sheet->{MaxRow} ||= $sheet->{MinRow};
for my $row ($sheet->{MinRow} .. $sheet->{MaxRow}) {
#looping for each row
if ($row > 0) {
#get the file url path from excel sheet at corresponding row, col 0
my $cell_value=$sheet->{Cells}[$row][0];
$excel_file_url=$cell_value->{Val};
print $excel_file_url . " \n";
}
}
}