[freeside-commits] freeside/FS/FS Record.pm,1.169,1.170
Ivan,,,
ivan at wavetail.420.am
Tue Nov 25 16:20:32 PST 2008
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv10950
Modified Files:
Record.pm
Log Message:
should fix importing from excel, closes: RT#4337
Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -d -r1.169 -r1.170
--- Record.pm 15 Sep 2008 07:18:56 -0000 1.169
+++ Record.pm 26 Nov 2008 00:20:30 -0000 1.170
@@ -1388,7 +1388,8 @@
eval "use Spreadsheet::ParseExcel;";
die $@ if $@;
- my $excel = new Spreadsheet::ParseExcel::Workbook->Parse($filename);
+ my $excel = Spreadsheet::ParseExcel::Workbook->new->Parse($filename);
+
$parser = $excel->{Worksheet}[0]; #first sheet
$count = $parser->{MaxRow} || $parser->{MinRow};
@@ -1430,7 +1431,8 @@
} elsif ( $type eq 'xls' ) {
- last if $row > ($parser->{MaxRow} || $parser->{MinRow});
+ last if $row > ($parser->{MaxRow} || $parser->{MinRow})
+ || ! $parser->{Cells}[$row];
my @row = @{ $parser->{Cells}[$row] };
@columns = map $_->{Val}, @row;
More information about the freeside-commits
mailing list