Win32::OLE open excel file as read only


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Win32::OLE open excel file as read only
# 1  
Old 03-11-2008
Win32::OLE open excel file as read only

I am using Win32::OLE to write a perl script which opens an excel file. That excel file is password protected and everytime i run that script dialog box pops up and I have to click on Read-Only then my script executes. Is there any way I can specify the readonly attribute in my code so i dont have to click on read only.

Thanks,
guy
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

win32 ole in deepr details in perl

Hello Gurus, I am begginer in perl. I would like to ask several questions, some related to perl and its syntax but most will be regarding to WIN32 OLE. My main goal is to develop script that will check word document structure (return some information) and make some changes in this document (if it... (0 Replies)
Discussion started by: wakatana
0 Replies

2. Shell Programming and Scripting

Details about WIN32::OLE

Hi all, Is win32::OLE module is applicable in linux system??? from my understanding it is not possible..because we have to use some tools for that..for more info refer this website http://oclug.on.ca/archives/oclug/2001-July/008100.html (1 Reply)
Discussion started by: kavi.mogu
1 Replies

3. UNIX and Linux Applications

Perl Script to read an excel file into an array and search in the UNIX directories

Hi, I want the Perl script with versions 5.8.2 and 5.8.5 starting with #!/usr/bin/perl The Perl program should read the excel file or text file line by line and taking into an array and search in the UNIX directories for reference file of .jsp or .js or .xsl with path .The Object names... (2 Replies)
Discussion started by: pasam
2 Replies

4. UNIX for Dummies Questions & Answers

Read excel file using shell script

Is it possible to read an excel sheet using shell script ? (2 Replies)
Discussion started by: hiten.r.chauhan
2 Replies

5. Shell Programming and Scripting

PERL Win32::OLE Inserting Picture in Excel

I am trying to insert a picture into a worksheet in Excel using Perl the following is the code use Win32::OLE; use Win32::OLE::Const "Microsoft Excel"; use Win32::OLE qw(in with); # Initiate Excel application $Excel = Win32::OLE->new('Excel.Application', 'Quit'); $Excel->{Visible} =1; #... (1 Reply)
Discussion started by: cold_Que
1 Replies

6. Shell Programming and Scripting

MS Outlook + Win32::OLE

Hey guys, I'm trying to go through my emails in Outlook until I find an email with a certain subject line. I am able to send emails with no problem, but reading emails and their properties (From, Subject, etc.) is my main problem. Basically, I don't know where to start and using search engines... (2 Replies)
Discussion started by: kooshi
2 Replies

7. Shell Programming and Scripting

Read Ms-excel file in unix

Hi, I have the Ms Excel file(test.xls) in my UNIX box. I would like to read the excel file and create files for each column. Please find an example. My excel file like this data: Num Data 1 a1 2 b2 3 c3 4 d4 5 e5 6 f6 7 h7 My output: I want create 2 files(num.log and... (3 Replies)
Discussion started by: koti_rama
3 Replies

8. Shell Programming and Scripting

use awk to read randomly located columns in an excel file

Hi, I have an excel file that have a random count of columns/fields and what im trying to do is to only retrieve all the rows under 2 specific field headers. I can use the usually command for awk which is awk 'print{ $1 $2}' > output.txt, but the location of the 2 specific field headers is... (9 Replies)
Discussion started by: mdap
9 Replies

9. UNIX for Dummies Questions & Answers

How do u open a read only file in Unix?

How do u open a read only file in Unix? (1 Reply)
Discussion started by: JosephGerard
1 Replies

10. Programming

how can i read an excel file using C?

hi.. i have the next question: i need to read an excel file (xls) using a C program. Is that possible? how can i do that? please, any idea thanks (6 Replies)
Discussion started by: DebianJ
6 Replies
Login or Register to Ask a Question
COM_GET_ACTIVE_OBJECT(3)						 1						  COM_GET_ACTIVE_OBJECT(3)

com_get_active_object - Returns a handle to an already running instance of a COM object

SYNOPSIS
variant com_get_active_object (string $progid, [int $code_page]) DESCRIPTION
com_get_active_object(3) is similar to creating a new instance of a "COM" object, except that it will only return an object to your script if the object is already running. OLE applications use something known as the " Running Object Table" to allow well-known applications to be launched only once; this function exposes the COM library function GetActiveObject() to get a handle on a running instance. PARAMETERS
o $progid -$progid must be either the ProgID or CLSID for the object that you want to access (for example Word.Application). o $code_page - Acts in precisely the same way that it does for the "COM" class. RETURN VALUES
If the requested object is running, it will be returned to your script just like any other COM object. ERRORS
/EXCEPTIONS There are a variety of reasons why this function might fail, the most common being that the object is not already running. In that situa- tion, the exception error code will be MK_E_UNAVAILABLE; you can use the getCode method of the exception object to check the exception code. NOTES
Warning Using com_get_active_object(3) in a web server context is not always a smart idea. Most COM/OLE applications are not designed to handle more than one client concurrently, even (or especially!) Microsoft Office. You should read Considerations for Server-Side Au- tomation of Office for more information on the general issues involved. PHP Documentation Group COM_GET_ACTIVE_OBJECT(3)