I am trying to update an excel file with gembox. I want gembox to search the excel file for a certain string, and update all matches. But the method FindText() only returns the first occurrence.
I tried the following, but it causes an infinite loop, for some reason the row and column won't update to the next search result.
private void RenameSubCategory(ExcelWorksheet sheet, string subCategoryOld, string subCategoryNew)
{
int row, column;
while (sheet.Cells.FindText(subCategoryOld, false, false, out row, out column)) {
sheet.Cells[row, column].Value = subCategoryNew;
}
}