public override void Clear() { for (int i = Count - 1; i >= 0; i--) { ExcelBookNpoi.RemoveSheetAt(i); } }
public override void Insert(int index, IExcelSheet item) { if (item is ExcelSheetNpoi) { var newSheet = (ExcelSheetNpoi)item.Copy(this); ExcelBookNpoi.SetSheetOrder(newSheet.Name, index); } else { throw new Exception($"{item}不是通过Npoi实现的工作表"); } }
public override IExcelSheet Add(string name = "Sheet") { var sheet = ExcelBookNpoi.CreateSheet(ExcelRealize.SheetRepeat(this, name)); return(new ExcelSheetNpoi(ExcelBook, sheet)); }