I developed a custom ASP.NET froms to integrate them in a sharepoint application, to update an Excel file from these Forms.
I am getting a problem with the file wich is located in a shared folder. When i get the ExcelPackage, i don't have a problem but wehn accessing to a specific Range of cells, i don't get anything.
Here is My code
FileInfo info = new FileInfo(filePath);
using (ExcelPackage exPckg = new ExcelPackage(info))
int delay = int.Parse(ICUtilities.GetConfigValue(SPContext.Current.Web, "Delay"));
//Here i'm obliged to wait some time to get the instance of the worksheets, else it catch an exception
var exWshts = exPckg.Workbook.Worksheets[workSheet];
//Here i am getting the issue exWshts.Celss : Object Refrence not set to an instance of an object.
var exRange = exWshts.Cells[rowBegin, columnCode, rowEnd, columnCode];
var enumRange = exRange.GetEnumerator();
Is there something wrong in my code. Why i am able to get the excel file, the worksheet but not the Cells?
Could you help me it's very urgent !!!