Excel encryption

Hi all,

I have a script which runs across a directory and opens Excel files,
does a few things and then saves the files, however password protected
files are becoming a bit of a pain. When I encounter a password
protected file, Excel prompts me for a password, at this point I want to
skip the file and ignore it, however my only option is to enter the
password (which I do not have) or cancel which therefore terminates the
script.

Could anyone help me with ideas of how to skip this data?

Many thanks

···

--
Posted via http://www.ruby-forum.com/.

Why not examine a file's properties before opening and if encrypted is found true in properties, forget to open that file? How that's done with ruby I don't yet know though.

···

-----Original Message-----
From: Stuart Clarke [mailto:stuart.clarke1986@gmail.com]
Sent: Tuesday, January 04, 2011 10:12
To: ruby-talk ML
Subject: Excel encryption

Hi all,

I have a script which runs across a directory and opens Excel files,
does a few things and then saves the files, however password protected
files are becoming a bit of a pain. When I encounter a password
protected file, Excel prompts me for a password, at this point I want to
skip the file and ignore it, however my only option is to enter the
password (which I do not have) or cancel which therefore terminates the
script.

Could anyone help me with ideas of how to skip this data?

Many thanks

--
Posted via http://www.ruby-forum.com/.