c# - npoi export from datatable -


I have an asp.net website that will generate some excel files with 7-8 sheets of data. The best solution still seems to be, it can create Excel files without installing Excel on the server, and there is a good API simulator for Excel Interop.

However, I can not find any way to dump how to make whole datasets in Excel similar to CopyFromRecordset

, or better solution than NPOI ?

I think NPO is a good solution, you can work on a server based environment such as ASP.net Do not want to interop with it, it's not just designed for it and it will fail. In fact MS does not support it, I will update with a link.

Our team for NPOI has used it for a lot and I know that they have written a routine to dump the datalet, so I think it means that in NPOI Capacity is not basically.

Actually what you have to do, calculate the values ​​in each row of the datatale and write the value, it should be a simple simple routine to write.

Update : I promised the link

An important phrase from the above link

Microsoft currently does not allow any unrestricted, non-interactive client applications or components (ASP, ASP, ATP , Including DCOM and NT services) does not support the operation of Microsoft Office applications, and does not support, because the Office can show unstable behavior and / or deadlock when Office is run in this environment.


Comments