On Thu, 08 Dec 2005, Hon Shi wrote:
> Using Win32::OLE with Excel
>
> If the script has a problem with the COM object, it just dies instead
> of setting the error and allowing a test.
>
> This happens everytime a value is accessed on an undefined Range
> obj like,
>
>   $sheet->Range("A1")->{'Value'} = 44
>
> The work around is to just point to the Range (do nothing) and then
> check for an error. Is this the way it's supposed to work?

Yes, that is how you have to do it if one of your method call
can fail.

Alternatively you can put your code into an eval {} block and then
check $@ afterwards.

Cheers,
-Jan



_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to