Tell me how you can cycle compare 2 Excel files with Epplus. I can not. I can find a match, but it is necessary that when I find it, I check the condition in the string for another value.
foreach (var item in ws2.Cells["B:B"]) { foreach (var item2 in ws.Cells["T:T"]) { if (item.Value.ToString() == item2.Value.ToString()) { kol++; label8.Text = kol.ToString(); } } } If done through Microsoft.Office.Interop.Excel, it turns out like this:
for (i = 1; i < objXlsx.Columns[20].Cells[objXlsx.Rows.Count].End(Excel.XlDirection.xlUp).Row; i++) { x_Count = objUserXlsx.Columns[2].Find(objXlsx.Columns[20].Cells[i], Type.Missing, Excel.XlFindLookIn.xlValues, Excel.XlLookAt.xlPart); if (x_Count != null) { result++; bunifuCustomDataGrid1.Rows[StrokaPochtamta].Cells[3].Value = result; if (objXlsx.Cells[i, 5].Value == "то что надо найти") { resultat2++; } if (objXlsx.Cells[i, 4].Value == "то что надо найти") { resultat3++; bunifuCustomDataGrid1.Rows[StrokaPochtamta].Cells[5].Value = resultat3; } if (objXlsx.Cells[i, 4].Value == "то что надо найти") { resultat4++; bunifuCustomDataGrid1.Rows[StrokaPochtamta].Cells[6].Value = resultat4; } } } And how to do this through Epplus.