You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
735 B
20 lines
735 B
8 years ago
|
#!/usr/bin/perl
|
||
|
|
||
|
use Spreadsheet::XLSX;
|
||
|
|
||
|
my $excel = Spreadsheet::XLSX -> new ('country_song.xlsx', $converter);
|
||
|
foreach my $sheet (@{$excel -> {Worksheet}}) {
|
||
|
printf("Sheet: %s\n", $sheet->{Name});
|
||
|
$sheet -> {MaxRow} ||= $sheet -> {MinRow};
|
||
|
foreach my $row ($sheet -> {MinRow} .. $sheet -> {MaxRow}) {
|
||
|
$sheet -> {MaxCol} ||= $sheet -> {MinCol};
|
||
|
foreach my $col ($sheet -> {MinCol} .. $sheet -> {MaxCol}) {
|
||
|
my $cell = $sheet -> {Cells} [$row] [$col];
|
||
|
if ($cell) {
|
||
|
printf("( %s , %s ) => %s\n", $row, $col, $cell -> {Val});
|
||
|
#if ($cell -> {Val} == 4 { print "'" . $sheet -> {Cells} [$row] [$col - 1] -> {Val} . "', " }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|