Click here to Skip to main content
15,920,688 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how can we access a excel file throgh a c# Windows program
Posted
Comments
agent_kruger 14-Feb-14 8:43am    
please search google first and what actually you want to do retrieve data or save it in excel?

 
Share this answer
 
You will need to use the COM Interop to work with Excel, 1st you need to have Excel or Office installed. Now the bad, with the different versions of Office it can be quite daunting to keep it all in order. There are versions of Office that implement some methods differently or do not support features that other versions do. Your code will need to have checks in plcace to prevent trying to do something that a certain version does not support or crashes will happen.

With warning in place, here is a tutorial that will get you started.
How to: Use COM Interop to Create an Excel Spreadsheet (C# Programming Guide)[^]
 
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