我的代码是这样写的:
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "Excel 97 - 2003 工作薄(*.xls)|*.xls|Excel工作薄(*.xlsx)|*.xlsx";
saveFileDialog.DefaultFileName = ReportName;
var stream = saveFileDialog.OpenFile();
this.gcSpreadSheet1.SaveExcel(stream, GrapeCity.Windows.SpreadSheet.Data.ExcelFileFormat.XLS);
stream.Dispose(); |