Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the Spreadsheet-XLSX CPAN distribution.

Report information
The Basics
Id: 82594
Status: new
Priority: 0/
Queue: Spreadsheet-XLSX

People
Owner: Nobody in particular
Requestors: jjohnson [...] asocorp.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: {MinCol} fails for some spreadsheets with null A1
Download (untitled) / with headers
text/plain 1.1k
I think the following is failing for the attached spreadsheet: my $excel = Spreadsheet::XLSX -> new ('test.xlsx'); If you execute a script that prints the values of the first two columns for all rows it will not print any column A value for the attached spreadsheet (a sample of many that also fails). If you change A1 to space, delete the space, then save (or use Excel to save to another file) everything is fine. See test script below: ++++++++++++++++++++++++++++++++++++++++++++ my $excel = Spreadsheet::XLSX -> new ('test.xlsx'); # this line could be failing if the creation determines {MinCol} foreach my $sheet (@{$excel -> {Worksheet}}) { printf("Sheet: %s\n", $sheet->{Name}); $sheet -> {MaxRow} ||= $sheet -> {MinRow}; foreach my $row ($sheet -> {MinRow} .. $sheet -> {MaxRow}) { $sheet -> {MaxCol} ||= 0; foreach my $col ($sheet -> {MinCol} .. $sheet -> {MaxCol}) { my $cell = $sheet -> {Cells} [$row] [$col]; # this returns a null value for all rows before saving the spreadsheet if ($cell) { printf("( %s , %s ) => %s\n", $row, $col, $cell -> {Val}); } else { printf("( %s , %s ) => %s\n", $row, $col); } } }
Subject: test.xlsx
Download test.xlsx
application/octet-stream 5.3k

Message body not shown because it is not plain text.



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.