Bhavleen Singh

Bhavleen Singh

  • NA
  • 203
  • 5.1k

How Populate Excel Worksheets name to dropdown

Jun 4 2019 12:26 AM
want to fetch Excel worksheet name and bind it to dropdown list, I've tried 
try
{
var document = SpreadsheetDocument.Open(file.InputStream, false);
workbookPart = document.WorkbookPart;
var sheets = workbookPart.Workbook.Descendants<Sheet>();
var sheet = sheets.First();
data.SheetName = sheet.Name;
}
 
by this I get 1st sheet name in var sheet but excel file having multiple sheets and I want to get all
Help! 

Answers (6)