Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: don't understand bless

by ides (Deacon)
on Mar 26, 2008 at 15:29 UTC ( #676426=note: print w/ replies, xml ) Need Help??


in reply to don't understand bless

You don't need to bless anything most likely. That error is telling you that $Excel doesn't contain an object and so you can't call a method on it.

bless() is used in creating objects, so to make the error message make more sense think of it as "Can't call method Workbook on a non-object"

Frank Wiles <frank@revsys.com>
www.revsys.com


Comment on Re: don't understand bless
Re^2: don't understand bless
by lepetitalbert (Monsignor) on Mar 27, 2008 at 08:08 UTC

    Hello dear Monks,

    Thank you all for your help

    This seems to be second strange bug I'm facing with perl / apache / excel.

    this morning I went back to the code which first gave me error :

    my $Excel = Win32::OLE->new('Excel.Application') or die "Could not + start excel"; $Excel->{'Visible'} = 0; $Excel->{DisplayAlerts} = 0; my $Book = $Excel->Workbooks->Open ( $excel_template ) or die "Could not open excel template $excel_template"; # open + Excel file my $Sheet = $Book->Worksheets(1) or die "Could not get Worksheet i +n $excel_template"; $Sheet->Cells( 9 , 7 )->{Value} = "$name";

    and it works again !?

    If anyone has an idea where to search ? apache / perl / OLE / excel ?

    Have a nice day

    "There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2015-07-03 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls