This project is read-only.

Getting File Not Found Exception while using the OfficeOpenXmlCrypto and NPOI in my sharepoint Webpart.

Mar 3, 2014 at 1:29 PM
I have written a piece of code which works properly in a Console application but when I write the same code in the sharepoint I'm getting FileNotFound Exception.The file which I read is also present in the path which I give. But the "Exception.Message" is an Empty string.
Note: The error is not Could not load file or assembly OfficeOpenXmlCrypto. I have the dll in the bin folder of the SPWebApplication.
Please find the code below and kindly help if anyone aware of this issue.

using (OfficeCryptoStream ocs = OfficeCryptoStream.Open(strFullPath, "MyPassword"))

NPOI.XSSF.UserModel.XSSFWorkbook wbk = new NPOI.XSSF.UserModel.XSSFWorkbook(ocs);
ISheet ist = wbk.GetSheet("Sheet1");

String str =ist.GetRow(1).GetCell(0).ToString();


Thanks & Regards,
Mar 13, 2014 at 10:32 PM
I think it's your sharepoint issue instead of NPOI. You have to figure out by yourself