15.7. Read Excel file

Example 15-6. examples/applications/read_excel.pl

#!/usr/bin/perl 
use strict;
use warnings;


use Spreadsheet::ParseExcel::Simple qw();
my $xls = Spreadsheet::ParseExcel::Simple->read("spreadsheet.xls");
foreach my $sheet ($xls->sheets) {
    while ($sheet->has_data) {
        my @data = $sheet->next_row;
        print join "|", @data;
        print "\n";
    }
}

If you are interested in on-site trainings by the author, please contact me directly.

Online courses:

Would you like to get
updated when I publish
the next article?

Follow me:

Google Plus Twitter RSS feed