Last post Aug 26, 2015 01:05 AM by Fei Han - MSFT
Aug 25, 2015 12:29 AM|Tarun Dewangan|LINK
I want to write & read data on Excel file from my application and display records into a DataGrid in WPF.
Excel file should be created at run time if there is no any excel file in the application root path and then create required columns with specific datatype and size.
And also create new sheet for every month on the same file. Can it be possible at runtime?
How can I do this task, plz help.......
I'll be very thankful..
Aug 25, 2015 01:54 AM|sam_xiii|LINK
For the Excel part you can use a library such as CloseXML (https://closedxml.codeplex.com/) it's really easy to use (check the doc) :
you can read,write,create new sheets, etc
To check if the file exist, you can use
http://www.sambeauvois.be | @sambeauvois
Aug 26, 2015 01:05 AM|Fei Han - MSFT|LINK
This article explained how to read and write Data to Excel files with WPF, hoping it will be helpful.