Click here to Skip to main content
15,913,722 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a application that will read/write data to excel file.
it will work fine.

now i want to add one functionality to my application,

1) when my application is started at that time i want to check that the excel file is exist or not.
2) if it is not existed then i want to create a excel file with the name contact.xls
with worksheet1 name as contacts.
3) and want to add some contact to that sheet and save it to the application directory

one thing more how to get the application running directory information from c#

please help me...
Posted

1 solution

Follow step by step article to create excel file, and you are done.

http://www.c-sharpcorner.com/UploadFile/jayendra/5443/[^]



to get the root directory follow this article on msdn.

http://msdn.microsoft.com/en-us/library/aa457089.aspx[^]


mark as answer if solves you problem.
 
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