-1

Well I tried to search a lot but couldnt get it so I am posting this question here. In my application I am binding the Dropdown menu with the column of the SQL Table in database.

The user will select the appropriate choice from the drop down menu and add some data in the text box provided along with.

The problem I am facing is that I want to export he entire thing like the particular selection in the drop down and the data in the textbox into excel file once the button is clicked.

How should I approach in exporting the data into Excel worksheet.

SPandya
  • 1,161
  • 4
  • 26
  • 63

1 Answers1

1

There are a few ways you could go about this. If it needs to be excel (Xls/Xlsx) then you would need to look into Office Interop

If you just want to export the data to an application like excel so that it can read the file. You could write the data to a csv file there are many articles on the web about creating csv file from C# here is a SO thread

Community
  • 1
  • 1
David Molyneux
  • 304
  • 2
  • 12