Send query results to Excel from ASP.NET website

后端 未结 7 603
温柔的废话
温柔的废话 2020-12-17 02:49

We let users create ad-hoc queries in our website. We would like to have the user select their criteria, then click submit and have the results streamed automatically to Ex

7条回答
  •  情话喂你
    2020-12-17 03:05

    I'd recommend using a filehandler (.ashx) The only issue is creating the excel file from the DataTable. There are a lot of third party products that will do this for you (e.g. Infragistics provides a component that does just this).

    One thing I highly recommend against is using the Excel interop on your server...it's very heavyweight and isn't supported.

提交回复
热议问题