Programmatically read protected spreadsheets?

I need to read an (Excel) spreadsheet that is both password protected to open and to modify some worksheets. I have the password and do NOT need a “password recovery” program. I’m using the Perl Spreadsheet::ParseExcel module to read the spreadsheet to update a database, but it can’t handle any file that contains a FILEPASS record. Since I’m trying to automate this process, having to manually open the spreadsheet with calc, remove the passwords, and save it defeats the purpose. Politically it’s not possible to remove the passwords from the original spreadsheet.

Does anyone know of a (Linux) program that can be run unattended to strip passwords/encryption from a spreadsheet? I’d thought of using macros in Calc to do it, but it must run on a headless server (no GUI) and Calc won’t install without trying to also install most of X Windows.

If you are on Windows, you can do this using Excel.

Here are a couple of reasons why you shouldn’t use filepass at all, since it takes only 2 hours to be bruteforced:
http://groups.google.com/group/python-excel/browse_thread/thread/8fb35bff8cca5a47?pli=1

@ManWithNoName writes:

Does anyone know of a (Linux) program that can be run unattended to strip passwords/encryption from a spreadsheet?

I don’t believe LibreOffice has this functionality right now, but this does sound like it could be a great feature to add! If you are interested, please file an enhancement bug and provide as much information as possible. Don’t forget to mark your bug as an ‘enhancement’. The QA team will be happy to help you triage your feature request in the bugtracker.

I’d thought of using macros in Calc to do it, but it must run on a headless server (no GUI) and Calc won’t install without trying to also install most of X Windows.

Hmm… I think you should be able to install and run LO on a headless server with something like xvfb. You still may have to install some unnecessary X stuff…