只导出ActiveSheet的方法:
- for (int i = 0; i < fpSpread1.Sheets.Count; i++)
- {
- fpSpread1.Sheets[i].Visible = fpSpread1.ActiveSheetIndex == i;
- }
-
- fpSpread1.SaveExcel("test.xls");
- for (int i = 0; i < fpSpread1.Sheets.Count; i++)
- {
- fpSpread1.Sheets[i].Visible = true;
- }
复制代码 |