我传了一份数据,使用控件里数据的复制(灰色背景),然后在excel粘贴出来,我们尝试导出excel,数据行有5000多,列也比较多,但是永远在等待,请楼主调试查下原因
代码如下:
System.Windows.Forms.SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Title = "保存 Spread 为 EXCEL 格式";
saveFileDialog1.Filter = "XLSX 文件 |*.xlsx";
if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
var tmpSpread = new FpSpread();
MainSpread.fpSpreadControl.Save(saveFileDialog1.FileName, false);
tmpSpread.Open(saveFileDialog1.FileName);
tmpSpread.SaveExcel(saveFileDialog1.FileName, ExcelSaveFlags.UseOOXMLFormat | ExcelSaveFlags.SaveCustomColumnHeaders | ExcelSaveFlags.SaveAsFiltered);
MessageBox.Show("导出成功!");
} |
|