I have a workbook which is password protected i.e we need to give password to open that excel file.
I am using aspose.cells to convert excels to pdf .
I need to check through code whether the excel file is pasword protected or not.Below is the code that is being used:
Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook();
workbook.Open(HttpContext.Current.Server.MapPath(foldername + FileID));
//here goes your code for protected file
But im getting eroor at the first line itself when it is trying to open the file.
How to check in that case if the excel is password proteced ?