You need to be concentrating on
Learning Perl, as this code will not
teach you all the parts you need to understand the whole.
But here goes. All i did was grab the Synopsis code from
the documention for
Spreadsheet::ParseExcel::Simple
and added a line to open the output file and line to
print each row of data from the spreadsheet
(seperated by a single space) to that output file. Since
you didn't specify the column numbers for vin, model, and
year ... well ... i'll just make them up! This code is
untested:
use strict;
use warnings;
my $xls = Spreadsheet::ParseExcel::Simple->read('/tmp/carlist.xls');
open OUT, '>', 'carlist.txt' or die $!;
# these are made up: vin = 2, model = 4, year = 7
# put the right column numbers in here
my @cols = (2,4,7);
foreach my $sheet ($xls->sheets) {
while ($sheet->has_data) {
my @data = $sheet->next_row;
print OUT, "@data[@cols]\n";
}
}
jeffa
L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)