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

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.