PerlIO spreadsheet2csv

slanning on 2009-01-27T12:48:30

I haven't got it ready for CPAN yet, but I've recently been working on PerlIO::via::Spreadsheet (I don't like the name, but what else could I call it?). It should let you do this:

open my $fh, '<:via(Spreadsheet)', 'file.xls' or die "Couldn't open file.xls: $!"; while (<$fh>) { # spreadsheet emulated as an input stream is translated to CSV # $_ is a line of CSV; (note: for a few minutes this was wrong, updated) ... }

The spreadsheet would be whatever Spreadsheet::Read can deal with. Probably more a "neat to hack on" thing than something actually useful. (There are xls2csv utilities already. There are also problems with more complicated spreadsheets that aren't easily handled by a simple IO layer.)

Another idea I'm playing with is a layer to handle JSON.