导出代码如下:
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
string f;
f = saveFileDialog1.FileName.ToString();
System.IO.FileStream s = null;
s = new System.IO.FileStream(f, System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.ReadWrite);
fpSpread1.SaveExcel(s, FarPoint.Excel.ExcelSaveFlags.SaveBothCustomRowAndColumnHeaders);
s.Close();
MessageBox.Show("文件保存成功!", "提示");
} |