FarPoint.Web.Spread.FpSpread 导出Excel
#region 导出Excelstring path = ConfigurationManager.AppSettings["TempFilePath"];
if (!System.IO.Directory.Exists(path))
{
System.IO.Directory.CreateDirectory(path);
}
string newFilePath = "" ;
#region xlsx
//newFilePath = path + "" + _PRODWELLTESTDAILY_MAIN_Entity.WELLNAME + " (IL FIELD PRODUCTONWELL TEST REPORT" + txtThedate.Text + ").xlsx";
//FpSpread1.SaveExcel(newFilePath, FarPoint.Excel.ExcelSaveFlags.UseOOXMLFormat);
#endregion
#region xls
//方法一
newFilePath = path + "" + _PRODWELLTESTDAILY_MAIN_Entity.WELLNAME + " (IL FIELD PRODUCTONWELL TEST REPORT" + txtThedate.Text + ").xls";
FpSpread1.SaveExcel(newFilePath, FarPoint.Excel.ExcelSaveFlags.NoFlagsSet);
//方法二
FpSpread1.SaveExcel(newFilePath, FarPoint.Web.Spread.Model.IncludeHeaders.BothCustomOnly);
System.IO.MemoryStream s = new System.IO.MemoryStream();
FpSpread1.SaveExcel(s);
s.Close();
#endregion
#endregion
这个是为上个帖子分享出的你那边的正确代码吗?
页:
[1]