12 Quick-and-dirty filter lifted from the Spreadsheet::XSLX POD
13 to convert the first sheet of an Excel .xlsx file to TSV
17 xlsx2tab foo.xlsx > foo.tsv
21 use Spreadsheet::XLSX;
23 my $converter = Text::Iconv->new ("utf-8", "windows-1251");
25 my $excel = Spreadsheet::XLSX->new ($ARGV[0], $converter);
27 foreach my $sheet (@{$excel->{Worksheet}}) {
28 $sheet->{MaxRow} ||= $sheet->{MinRow};
29 foreach my $row ($sheet->{MinRow} .. $sheet->{MaxRow}) {
30 print join("\t", map { $_->unformatted() } @{ $sheet->{Cells}[$row] }), "\n";
32 last; # only look at the first worksheet for now