Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^10: read from xlsx is throwing error

by Tux (Canon)
on Dec 20, 2016 at 08:04 UTC ( [id://1178167]=note: print w/replies, xml ) Need Help??


in reply to Re^9: read from xlsx is throwing error
in thread read from xlsx is throwing error

I do not have your xlsx file, so I cannot check with *your* data, but when I do with a simple .xlsx file, all goes well:

$ cat pm1178127.pl #!/pro/bin/perl use 5.18.0; use warnings; use Spreadsheet::Read; my $book = ReadData ("julia-good.xlsx"); say "Book was parsed using $book->[0]{parser}-$book->[0]{version}"; say "A1: ", $book->[1]{A1}; my @rows = Spreadsheet::Read::rows ($book->[1]); foreach my $i (1 .. scalar @rows) { foreach my $j (1 .. scalar @{$rows[$i-1]}) { say chr (64 + $i) . " $j " . ($rows[$i - 1][$j - 1] // ""); } } $ xlscat julia-good.xlsx id|text 1|a 2|b 3|c 4|d 5|e 6|f 7|g 8|h 9|i 10|j 2 x 11 $ perl pm1178127.pl Book was parsed using Spreadsheet::ParseXLSX-0.27 A1: id A 1 id A 2 text B 1 1 B 2 a C 1 2 C 2 b D 1 3 D 2 c E 1 4 E 2 d F 1 5 F 2 e G 1 6 G 2 f H 1 7 H 2 g I 1 8 I 2 h J 1 9 J 2 i K 1 10 K 2 j $

So my first hunch is that your .xlsx cannot be parsed by your XLSX parser.


Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1178167]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-20 01:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found