in reply to How to convert Excel contents into a hash table and further access the contents of that hash table ?
Hi ankit.tayal560,
You need to break up your get_cell subroutine calls to avoid processing blank cells i.e. change every instance of:
$key_var = $worksheet->get_cell($x,$y)->value
to something like
$cell = $worksheet->get_cell($x,$y); next unless $cell; $key_var = $cell->value;
Additionally, I would change for my $row(1..$worksheet->row_range) to for my $row(1..($worksheet->row_range)[1]) - the row_range subroutine returns a list, not a scalar
I hope that helps, good luck!
Shadowsong
In Section
Seekers of Perl Wisdom