Spread没有提供单独的SHEET的导入方法,因此只能是通过代码循环来保存,新建一个spread控件,将每一个sheet循环放入来保存
- FpSpread tempsp = new FpSpread(LegacyBehaviors.All);
- tempsp.Sheets.Count = 1;
- int i =0;
- foreach (SheetView sh in fpSpread1.Sheets)
- {
-
- tempsp.Sheets[0] = sh.Clone();
- tempsp.SaveExcel(i + ".xlsx", ExcelSaveFlags.UseOOXMLFormat);
- i ++;
- }
复制代码 |