Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: How to convert Excel contents into a hash table and further access the contents of that hash table ?

by Tux (Canon)
on Oct 05, 2016 at 09:14 UTC ( [id://1173325]=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to convert Excel contents into a hash table and further access the contents of that hash table ?
in thread How to convert Excel contents into a hash table and further access the contents of that hash table ?

for my $row (1 .. $worksheet->row_range) { my $super_key = $worksheet->get_cell ($row, 0)->value; for my $col (0 .. 4) { my $key = $worksheet->get_cell (0, $col)->value; my $value = $worksheet->get_cell ($row, $col)->value; # here I am getting a problem # $student_data{$super_key}->{$key} = $value; } }

I am pretty sure the error if from either of the two lines above that. get_cell (...) will return undef for undefined cells, for which you cannot use the value method.


Enjoy, Have FUN! H.Merijn
  • Comment on Re^3: How to convert Excel contents into a hash table and further access the contents of that hash table ?
  • Select or Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-20 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found