Skip Menu |
 

This queue is for tickets about the Data-Table-Excel CPAN distribution.

Report information
The Basics
Id: 88752
Status: resolved
Priority: 0/
Queue: Data-Table-Excel

People
Owner: Nobody in particular
Requestors: bartelt [...] slac.stanford.edu
Cc:
AdminCc:

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



Subject: column header problems
Date: Tue, 17 Sep 2013 13:37:01 -0700 (PDT)
To: bug-Data-Table-Excel [...] rt.cpan.org
From: John Bartelt <bartelt [...] slac.stanford.edu>
Download (untitled) / with headers
text/plain 996b
I am using xlsx2tables to import one sheet from an .xlsx file. This mostly works, except for problems with the column headers. (1) A first row is created with contents "col1, col2, col3, ..." (2) The second row has the real column headers from the xlsx file. Except the first column is blank. That is, if I output this as a CSV file, the first two rows are: col1,col2,col3,col4,col5,col6 ,Region Type,Type,Manufacturer,Part Number,Name The first problem can be dealt with simply by deleting it. The second problem is more pernicious. I am puzzled why this one row is missing its first entry. The other rows are fine. Thanks for any help. My simple script is listed below, in case this is a coding error on my part. John Bartelt #!/usr/local/bin/perl use strict; use Data::Table; use Data::Table::Excel qw(xlsx2tables); my $t = new Data::Table; my ($t, $names) = xlsx2tables("RT-File.xlsx", undef, [1]); my $out = "RT-File.csv"; open (OUT, ">$out"); print OUT $t->[0]->csv; close OUT;
Download (untitled) / with headers
text/plain 1.2k
It depends on Spreadsheet:XLSX for parsing .xlsx format. The module needs to be updated. Some notes will be added to release 0.3 to make users aware of this. Thanks. On Tue Sep 17 16:37:15 2013, bartelt@slac.stanford.edu wrote: Show quoted text
> I am using xlsx2tables to import one sheet from an .xlsx file. > This mostly works, except for problems with the column headers. > > (1) A first row is created with contents "col1, col2, col3, ..." > (2) The second row has the real column headers from the xlsx file. > Except the first column is blank. That is, if I output this as > a CSV file, the first two rows are: > > col1,col2,col3,col4,col5,col6 > ,Region Type,Type,Manufacturer,Part Number,Name > > The first problem can be dealt with simply by deleting it. > The second problem is more pernicious. I am puzzled why this one row > is missing its first entry. The other rows are fine. > > Thanks for any help. My simple script is listed below, in case this is > a coding error on my part. > > John Bartelt > > #!/usr/local/bin/perl > use strict; > use Data::Table; > use Data::Table::Excel qw(xlsx2tables); > > my $t = new Data::Table; > my ($t, $names) = xlsx2tables("RT-File.xlsx", undef, [1]); > > my $out = "RT-File.csv"; > open (OUT, ">$out"); > print OUT $t->[0]->csv; > close OUT; > >


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.