hill has asked for the wisdom of the Perl Monks concerning the following question:
Then things got too strange for this Perl duffer. The offending file (79kb) is data from another group. I can't control how it's formatted. If I save the file as a 'csv' file, open that and re-save it in the 'xls' format, the script shrinks significantly and works properly. If I save the original file as another 'xls' file its size grows to 93kb and I get a completely different error. And, if that weren't strange enough, I have another, similar file (similar size) from the same group that produces another error and it shuts down the perl interpreter. So, am I struggling with a ParseExcel problem or, what seems more likely to me, a problem with Excel itself? Or just simple ineptitude? Always a possibility. Many thanks for your attention.#!/usr/bin/perl use strict; use Spreadsheet::ParseExcel; my $parse_excel = Spreadsheet::ParseExcel->new(CellHandler => \&cell_handler, NotSetCell => 1); my $workbook = $parse_excel->Parse('22 JAN 2011 CRAM CFC1.xls'); sub cell_handler { my $workbook = $_[0]; my $sheet_index = $_[1]; my $row = $_[2]; my $col = $_[3]; my $cell = $_[4]; # Do something useful with the formatted cell value print $cell->{Val}, "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ParseExcel difficulties
by GrandFather (Saint) on Mar 05, 2011 at 01:53 UTC | |
|
Re: ParseExcel difficulties
by jmcnamara (Monsignor) on Mar 05, 2011 at 10:12 UTC | |
|
Re: ParseExcel difficulties
by davies (Monsignor) on Mar 05, 2011 at 11:35 UTC | |
|
Re: ParseExcel difficulties
by Monkomatic (Sexton) on Mar 05, 2011 at 06:27 UTC |