title: Generate Excel file from DataTable (Best way), Interop
body: <p>I want to generate an Excel file from DataTable in C#. Right now, I do a query on the database and it returns about 4 millions records. I already have reduced the time to 2 minutes; I don't want lose that optimization. Is there something like a "bulk" to write on a file? Everybody suggest to read row by row from DataSet and write on an Excel File.</p>