Is there a simple way to translate an XLS to a CSV formatted file without starting the Excel windowed application?
I need to process some Excel XLS workbooks with sc
my solution:
use Spreadsheet::BasicRead;
my $xls = 'file.xls';
my $csv = 'file.csv';
my $ss = new Spreadsheet::BasicRead($xls) or die "Could not open '$xls': $!";
my $name = '';
my $row = 0;
open(FILE, ">$csv") or die "Could not open : $!\n";
flock(FILE, 2) or die "Could not lock file\n";
while (my $data = $ss->getNextRow()){
$row++;
$name = join(';',@$data);
print FILE $name."\n" if ($name ne "");
}
flock(FILE, 8);
close FILE;