Exemple #1
0
 /// <summary>
 /// Determines whether [has sheet with name] [the specified sheet name].
 /// </summary>
 /// <param name="sheets">The sheets.</param>
 /// <param name="sheetName">Name of the sheet.</param>
 /// <returns></returns>
 public static bool HasSheetWithName(this DocumentFormat.OpenXml.Spreadsheet.Sheets sheets, string sheetName)
 {
     return((from s in sheets.Descendants <DocumentFormat.OpenXml.Spreadsheet.Sheet>()
             where s.Name != null && s.Name.HasValue && s.Name.Value == sheetName
             select s).Any());
 }