示例#1
0
 public static IEnumerable <Sheet> Sheets(this SpreadsheetDocument spreadsheet)
 {
     return(spreadsheet.Sheets(null).Select(p => new Sheet {
         OXmlSheet = p,
         WorkbookPart = spreadsheet.WorkbookPart,
         WorkSheetPart = spreadsheet.WorkSheet(p),
         Dimension = (spreadsheet.WorkSheet(p)).Worksheet.SheetDimension.Reference
     }));
 }
示例#2
0
 public static IEnumerable <Sheet> Sheets(this SpreadsheetDocument spreadsheet)
 {
     return(spreadsheet.Sheets(null).Select(p => new Sheet {
         OXmlSheet = p,
         WorkbookPart = spreadsheet.WorkbookPart,
         WorkSheetPart = spreadsheet.WorkSheet(p),
         Dimension = spreadsheet.WorkSheet(p)
                     .RootElement.Descendants <DocumentFormat.OpenXml.Spreadsheet.SheetDimension>()
                     .FirstOrDefault().Reference
     }));
 }