2015. március 25., szerda

Opening a password protected Excel document from c#

I have to write a migration tool for a client whose idea of data security is password protecting the Excel files.

However even if I supplied the Password and WriteResPassword parameters to the Open function, it still gave me a little dialog box asking for a password.

With some trial and error I found that in Read-Only mode the interop will actually open the file silently, so I thought I would share the code snippet.

As usual, your mileage may vary.

Nincsenek megjegyzések:

Megjegyzés küldése