Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am writing a program in C# and need to transfer some of my data which are stored in a listbox to an excel file. Please can someone help me with a code in C# which I can use to transfer the data to excel.
Posted
Comments
ZurdoDev 16-Jun-14 8:40am    
Where are you stuck? There are plenty of examples of how to write to Excel from C#.
Debabrata_Das 16-Jun-14 8:53am    
Hello friend, if you just google "export to excel C#", I'm sure you'll get plenty of ready-made solutions. Pick one of those solutions and give a try. If you're stuck to any specific point, come back and post your question. We'll be happy to help you out.
- DD

1 solution

Here are a couple of articles on this site of how to work with Excel. All you need to do is understand how to write to excel and then it's easy to take your values from the listbox and put into Excel.

For example:
Generate Excel files without using Microsoft Excel[^]
and
Fast Exporting from DataSet to Excel[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900