Greeting for the day!
var FileContent = new DocumentTemplateFacade().DocumentProcessFileSelect(fileFormat: ".xlsx", devId: Convert.ToInt32(hdnDevId.Value));
FileContent.DocumentContent.Position = 0;
xmlDoc1 = SpreadsheetDocument.Open(FileContent.DocumentContent, false);
Stream ms = FileContent.DocumentContent;
ms.Position = 0;
aspWorkbook = new Aspose.Cells.Workbook(ms);
List<TableTypes> SheetNames = new List<TableTypes>();
var workbook = xmlDoc1.WorkbookPart.Workbook;
//IEnumerable<Sheet> lstSheet = xmlDoc1.WorkbookPart.Workbook.Descendants<Sheet>();
IEnumerable<Sheet> lstSheet = xmlDoc1.WorkbookPart.Workbook.Descendants<Sheet>().Where((s) => s.Name.ToString().ToLower().Trim() != "coverpage" && s.Name.ToString().ToLower().Trim() != "revision history");
for (int lstSheetCount = 0; lstSheetCount < lstSheet.Count(); lstSheetCount++)
{
ExcelSheetName = lstSheet.ElementAt(lstSheetCount).Name;
ds = new TableTypes();
ds.TableId = lstSheetCount + 1; // Convert.ToInt32(relationshipId);
ds.TableName = ExcelSheetName;
SheetNames.Add(ds);
}
I need to check if excel sheet has hide i should not load hidden sheet name how to check