i need code in C# to open my excel sheet which contain list of students names ,and open CSV file contain two columns name of same student in excel sheet, and marks of student ... by click on button i want to match between the names and put in the excel sheet every name with his mark. That's all just find names and marks from CSV and put it on next cell of name in excel sheet
views:
43answers:
1
+1
A:
Reading from the Excel file:
http://stackoverflow.com/questions/15828/reading-excel-files-from-c
Reading from the CSV file:
http://www.switchonthecode.com/tutorials/building-a-simple-csv-parser-in-csharp
(Google for more)
You'll want to tweak the final output of this stuff, of course, so they can be easily compared and manipulated against one another.
Writing to the Excel file may be a little trickier. You may end up having to use the COM library for it:
But, depending on your needs, you may be able to get away with something simpler:
David
2010-07-12 19:12:46
You can write with ADO.Net as well - http://www.msnetprogrammer.net/blog/post/2008/02/07/Reading-Writing-to-Excel-Worksheet-ADONET2c-C.aspx
Mikael Svenson
2010-07-12 19:16:32
Sweet, I didn't know that. Noted for future development at my job, thanks!
David
2010-07-12 19:18:14