Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: How to get cell format of xls

by bimleshsharma (Beadle)
on May 23, 2012 at 09:43 UTC ( #971994=note: print w/replies, xml ) Need Help??

in reply to How to get cell format of xls

i am using module as below
use Spreadsheet::ParseExcel::SaveParser; my $template = $parser->Parse('compare_reports/38_HMI1071_cre_cdo_G.xl +s'); # Get the format from the cell my $worksheet = $template->worksheet($sheet); my $val=$worksheet->get_cell($row,$col)->value()
I am getting error (Can't call method "value" on an undefined value at)when cell($row,$col) is blank. How to handle blank cell. pls help.

Replies are listed 'Best First'.
Re^2: How to get cell format of xls
by moritz (Cardinal) on May 23, 2012 at 09:49 UTC
      Ok, i used below but getting error...
      if(undef $worksheet->get_cell($row,$col)){ next; }
      error now i am getting:"Can't modify non-lvalue subroutine call at ."
Re^2: How to get cell format of xls
by Corion (Pope) on May 23, 2012 at 09:49 UTC

    Have you tried not calling ->value when ->get_cell() returns undef? What happened when you tried it?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://971994]
[PriNet]: i guess i'll just have to use two seperate hashes, there are two, but one is larger than the other, and when i reference the smaller one, it holds onto the values that were assigned to the larger hash (the keynames change, but unless i reassign a new valu

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2017-06-28 03:04 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (619 votes). Check out past polls.