Reputation: 6444
I need to remove the password protection from an uploaded excel file. I have been doing this directly with the Excel assemblies (ASP.NET/C#) and then I tried with the ooxmlcrypto, both worked, but the problem is that I can not deploy either of those solution because of the dependencies.
I mean, my sysadmin does not want us installing Excel on the server and, as I have been searching for some alternatives, I can not find one.
My question is: is there a way to put the necessary dlls in the server without installing Excel or the Office suite?
I found this: Office 2007 Primary Interop Assemblies redistributable package but still, it requires a Microsoft Office Product.
Any ideas?
Upvotes: 2
Views: 5577
Reputation: 792
You can use third party component to remove the Excel password.
For example: SmartXLS for .Net can read/write Excel97-2003 xls file and Excel2007 xlsx file with the password to encrypt/decrypt it.
Upvotes: 1
Reputation: 2617
You're looking at the problem the wrong way. If you can't use Excel, then don't process Excel. Trying to reverse-engineer Excel is not the road you want to go down. Get your clients to use another format. For security, use an open encryption standard such as zipping the files. Also, spreadsheets are a terrible format for processing, because users will always find new ways of mangling the layout. They will submit dates as strings, or add a new column, etc. You will be forever making small changes to idiot-proof your code. Insist on something unambiguous, like csv
Upvotes: 1