Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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.


Comment on Re: How to get cell format of xls
Download Code
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?

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 ."

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (16)
As of 2014-07-10 17:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (213 votes), past polls