Question: how to export sql data to excel using microsoft.interop.office.excel and c#?
Answer: Step 1: Create the instances of ExcelEngine and IApplication. ...  Step 2: Create a new workbook instance with one worksheet. Step 3: Create a connection string to establish a connection with a SQL Server database and query string to retrieve data from a SQL Server database similar to ADO.NET.