It looks like you're new here. If you want to get involved, click one of these buttons!
Please explain me how to create a Excel Worksheet having .xls and .xlsx format in C#. I looked for a good reference, but was not successful. Please help. Thanks in advance.
Check this free excel API: http://freenetexcel.codeplex.com
Workbook workbook = new Workbook();
Worksheet sheet = workbook.Worksheets;
sheet.Range["A3"].Text = "Text";
First add a reference from the right side in Solution Explorer. Right-click on the project then select Add Reference then select Microsoft.Office.Interop.Excel.Add the following namespace to the project.
First create a table using a DataGridView in the C# code.Then create an object of Excel Application, Workbook, Worksheet and Range.
For help, visit : http://knowledgetpoint.com/csharp/methods-in-csharp/