Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 meditating upon the Monastery: (6)
As of 2014-09-19 22:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (151 votes), past polls