Batuta
Batuta

Reputation: 1714

Code To Open Password Protected Excel File

Help!

I have a password protected Excel 2007 file and I lost the password. Any code in .NET to open such a file?

Basically, I would need just a snapshot of the contents of the file.

Thanks.

Upvotes: 1

Views: 1852

Answers (1)

Hans Olsson
Hans Olsson

Reputation: 55009

The only way in .Net I can think of would be to automate Excel and keep trying to enter different passwords, but it might be better to try to get hold of some app that might do that for you a bit more efficiently. This is assuming that you've used some simple word as the password, as far as I know there's no shortcuts so it'll have to do a dictionary attack, so if you've used a difficult password it might take a very long time to find otherwise.

Upvotes: 2

Related Questions