Home > Archive > PERL Beginners > June 2006 > excel ole open read only?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
excel ole open read only?
|
|
| liefje 2006-06-27, 3:58 am |
| i would like to open an xls file in read only mode so i dont have to
say 'no' to the dialog box saying 'do you want to save the changes?'
everytime the script opens the file and closes it. i have tried using
this:
my $Book = $Excel->Workbooks->Open({
FileName => 'i:\tmp\ole\test.xls',
ReadOnly => 1 });
and this:
my $Book = $Excel->Workbooks->Open('i:\tmp\ole\test.xls', 0, 1);
i have also tried setting readonly for the file attributes!
nothing seems to work, its always asking me if i want to save changes
that didnt even happen in the first place.
| |
|
| In article <1151399524.350482.326800@c74g2000cwc.googlegroups.com>,
"liefje" <liefje@gmail.com> wrote:
> i would like to open an xls file in read only mode so i dont have to
> say 'no' to the dialog box saying 'do you want to save the changes?'
> everytime the script opens the file and closes it. i have tried using
> this:
>
> my $Book = $Excel->Workbooks->Open({
> FileName => 'i:\tmp\ole\test.xls',
> ReadOnly => 1 });
>
>
> and this:
>
>
> my $Book = $Excel->Workbooks->Open('i:\tmp\ole\test.xls', 0, 1);
>
>
> i have also tried setting readonly for the file attributes!
>
>
> nothing seems to work, its always asking me if i want to save changes
> that didnt even happen in the first place.
I tried looking through the Win32::OLE modules, never having used them -
pretty extensive and not easy to follow.
You could try the Spreadsheet::ParseExcel module which will open a file
read-only I'm sure.
Boyd
|
|
|
|
|