I have been reading up on ways to read a CSV File in C# and I have heard that it is really complicated. What I am looking to do is have a console read a csv and if there are cells in column A that contain 123 it will delete all rows with a cell in column A with 123. BUT, as it does this all.. I need it to save to ANOTHER excel file so I have the original file as well. This is what I have to read the file.
int rCnt = 0;
int cCnt = 0;
xlApp = new Excel.ApplicationClass();
xlWorkBook = xlApp.Workbooks.Open("123abc.csv", 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
以上就是c# console app read excel sheet and remove rows based on contents的详细内容，更多请关注web前端其它相关文章！