weshatheleopard / rubyXL

Ruby lib for reading/writing/modifying .xlsx and .xlsm files
MIT License
1.28k stars 255 forks source link

Opening for Read a known Password protected xlsx #307

Closed pcoughlin closed 6 years ago

pcoughlin commented 6 years ago

I am looking for a way to open a password protected file in Rails. We know the password, so this is not cracking, just opening like normal but with the use of the password. The client wants to upload a password protected file (details have potential private data in it). We need to open the file and process the contents. Normal ... just with the twist of using the password to open the file.

I looked in previous issues and found these two that mention the password issue:

119 : https://github.com/weshatheleopard/rubyXL/issues/119#issuecomment-46745006

This one is about VBA code password: https://github.com/weshatheleopard/rubyXL/issues/258#issuecomment-283819136

Thanks!

weshatheleopard commented 6 years ago

Please note that RubyXL only opens .xlsx files. If that's the file you have, it can still be opened, password or no password.

However, if you need to open .xls files, go get spreadsheet gem.