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.
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.
精彩评论