예제 #1
0
 public override void Clear()
 {
     for (int i = Count - 1; i >= 0; i--)
     {
         ExcelBookNpoi.RemoveSheetAt(i);
     }
 }
예제 #2
0
 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实现的工作表");
     }
 }
예제 #3
0
        public override IExcelSheet Add(string name = "Sheet")
        {
            var sheet = ExcelBookNpoi.CreateSheet(ExcelRealize.SheetRepeat(this, name));

            return(new ExcelSheetNpoi(ExcelBook, sheet));
        }