Hi! I'm running into an issue where a spreadsheet has unicode
characters in it, and there is no way using
Spreadsheet::ParseExcel::Simple to pass a unicode formatter to
Parse. Could this be added as an optional parameter?
Thanks,
Ricky
Thu Oct 12 10:08:35 2006REMORSE [...] PARTNERS.ORG - Correspondence added
BTW: to solve this problem (which spews a ton of warnings to the
console, and thus via CGI::Carp back to people who wouldn't
understand a word of it), I rewrote read as follows:
sub read {
my $class = shift;
my ($file, $formatter) = @_;
my $book;
if (defined($formatter)) {
$book = Spreadsheet::ParseExcel->new->Parse($file, $formatter)
or return;
}
else {
$book = Spreadsheet::ParseExcel->new->Parse($file) or return;
}
bless { book => $book }, $class;
}
This allows you to use it like:
use Spreadsheet::ParseExcel::Simple;
use Spreadsheet::ParseExcel::FmtUnicode;
my $xls = Spreadsheet::ParseExcel::Simple->read($filename,
Spreadsheet::ParseExcel::FmtUnicode->new());
Thu Oct 12 12:14:13 2006tony [...] tmtm.com - Correspondence added
> my $xls = Spreadsheet::ParseExcel::Simple->read($filename,
> Spreadsheet::ParseExcel::FmtUnicode->new());
>
I don't really like optional arguments like this being passed
positionally. If you make it work via an options hash, and can provide a
test case, I'll apply it.
Thanks,
Tony
Thu Oct 12 12:14:14 2006The RT System itself - Status changed from 'new' to 'open'