Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > Win32::OLE, Excel and OLE Automation question
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 23rd October 13:44
joeminga
External User
 
Posts: 1
Default Win32::OLE, Excel and OLE Automation question



Thanks for the reply - I still got an error message:
C:\work\win32_ole>perl p1.pl c:\work\win32_ole\104.xls
OLE exception from "Microsoft Excel":

Unable to set the Locked property of the Range class

Win32::OLE(0.1603) error 0x80020009: "Exception occurred"
in PROPERTYPUT "Locked" at p1.pl line 26

I then remembered that the Excel workbook was password protected. I
added the line: $Sheet->Unprotect("${my_password}"); and it worked
fine. Thanks for the Activestate URL...
  Reply With Quote


 


2 23rd October 13:58
joeminga
External User
 
Posts: 1
Default Win32::OLE, Excel and OLE Automation question



Force of habit from my UNIX shell programming days I guess. In any
case, I tried to 'break' the program by setting the ${my_password}
variable = "blah.blah" (with a metacharacter), plus other combinations
and $Sheet->Unprotect($my_password); still worked fine. I guess I
should take a refresher look at quoting, braces and variables...
  Reply With Quote
Reply


Thread Tools
Display Modes




666