前端:
<FarPoint:FpSpread ID="FpSpread1" runat="server" BorderColor="Black" BorderStyle="Solid" BorderWidth="0px" OnPrintSheet="FpSpread1_PrintSheet" Height="200px" Width="940px" ActiveSheetViewIndex="0" DesignString="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;Spread /&gt;" OnUpdateCommand="FpSpread1_UpdateCommand">
后台:
protected void FpSpread1_PrintSheet(object sender, FarPoint.Web.Spread.PrintEventArgs e)
{
SetPrintData();//绑定数据
// FpSpread1.SaveExcelToResponse("test.xls", FarPoint.Excel.ExcelSaveFlags.NoFlagsSet);
e.Content = "";
}
FpSpread1_PrintSheet函数会反复执行 |
|