The attachment contains a password protected workbook that causes a failure on decryption. The problem occurs in the Footer record of the Stahl&Druck worksheet. The password is "test".
I had written my own decoder based on the Open Office algorithm. It failed at the same point so maybe your implementation of the algorithm is also based on the Open Office source. By the way Open Office *is* able to open this file successfully as can Excel.
Unfortunately the file is large and cutting it down in size seems to eliminate the problem. However this does indicate that the problem is to do with some aspect of the decoding process.
Also, the error only occurs when the file has a write as well as a read password so that's another clue though not one I've been able to use so far.
Although the error occurs on this large file and you may be forgiven for thinking that it is restricted to this large file, it also occurs when using many client files. Unfortunately I can't send you any of these.
Bill Seddon
PasswordError.zip