Hello,
I found here the EPPlus 3.1 is NOT able to open a decrypted Excel 2010. OutOfMemory Exception will be throw up.
according to my debug, the error throw from this line: __byte[] text = new byte[(int)HeaderSize - 34] as the HeaderSize is to large: 1836597052__ (OfficeOpenXml.Utils.EncryptionInfo.ReadBinary).
according to the articel in MSDN about EncryptionInfo Stream http://msdn.microsoft.com/en-us/library/dd925327%28v=office.12%29.aspx . Currently EPPlus3.1 definitely should work.
However the Excel 2010 EncryptionInfo format was changed. The HeaderSize calcuated is 0x3c + 0x3f +0x78 + 0x6d, 0x6d783f3c = __1836597052__
here is my EncryptionInfo binary header:
```
0000000: 0400 0400 4000 0000 3c3f 786d 6c20 7665 ....@...<?xml ve
0000010: 7273 696f 6e3d 2231 2e30 2220 656e 636f rsion="1.0" enco
0000020: 6469 6e67 3d22 5554 462d 3822 2073 7461 ding="UTF-8" sta
0000030: 6e64 616c 6f6e 653d 2279 6573 223f 3e0d ndalone="yes"?>.
0000040: 0a3c 656e 6372 7970 7469 6f6e 2078 6d6c .<encryption xml
```
I checked POI, it works. EPPlus can follow POI to fix this.
I found here the EPPlus 3.1 is NOT able to open a decrypted Excel 2010. OutOfMemory Exception will be throw up.
according to my debug, the error throw from this line: __byte[] text = new byte[(int)HeaderSize - 34] as the HeaderSize is to large: 1836597052__ (OfficeOpenXml.Utils.EncryptionInfo.ReadBinary).
according to the articel in MSDN about EncryptionInfo Stream http://msdn.microsoft.com/en-us/library/dd925327%28v=office.12%29.aspx . Currently EPPlus3.1 definitely should work.
However the Excel 2010 EncryptionInfo format was changed. The HeaderSize calcuated is 0x3c + 0x3f +0x78 + 0x6d, 0x6d783f3c = __1836597052__
here is my EncryptionInfo binary header:
```
0000000: 0400 0400 4000 0000 3c3f 786d 6c20 7665 ....@...<?xml ve
0000010: 7273 696f 6e3d 2231 2e30 2220 656e 636f rsion="1.0" enco
0000020: 6469 6e67 3d22 5554 462d 3822 2073 7461 ding="UTF-8" sta
0000030: 6e64 616c 6f6e 653d 2279 6573 223f 3e0d ndalone="yes"?>.
0000040: 0a3c 656e 6372 7970 7469 6f6e 2078 6d6c .<encryption xml
```
I checked POI, it works. EPPlus can follow POI to fix this.