0

We are receiving a Password protected Excel file (.xls) daily in our Linux server with password known and currently we are manually removing the password in local and using it for other reports.

Is there a way to automate password removal step in Linux (via shell scripts) with password known? or any other possible options?

tripleee
  • 175,061
  • 34
  • 275
  • 318
S G
  • 11
  • 3
  • your title says: _remove ... excel file_, but in the text of your posting, you say _removing the password_ : Just to make it clear: You want to remove the password, not the file, right? – user1934428 Dec 22 '21 at 12:02
  • Yes, just to remove the password protection from the file. – S G Dec 22 '21 at 12:09
  • 1
    You likely will have to dig into the Excel documentation for the exact file format. Perhaps [this](https://www.openoffice.org/sc/excelfileformat.pdf) document will be a starting point (See section 4.19). In any case, I don't think that _bash_ will be the right tool for this task. – user1934428 Dec 22 '21 at 12:20
  • On Linux it's not possible to remove the password protection. On Windows it would be possible, if it helps, check out [DocRecrypt](https://www.microsoft.com/en-us/download/details.aspx?id=36443) – eDonkey Dec 22 '21 at 12:24
  • 1
    Does this answer your question? [Working with Password Protected Excel Sheets in Python on Linux](https://stackoverflow.com/questions/27693759/working-with-password-protected-excel-sheets-in-python-on-linux) – eDonkey Dec 22 '21 at 12:28
  • 1
    If LibreOffice allows you to manipulate the file, you can probably script it; but again, not particularly at all a Bash question. A massively superior solution would be to persuade the sender to use a less putrid file format. – tripleee Dec 22 '21 at 13:32

0 Answers0