0
我想用gembox更新excel文件。我想让gembox在excel文件中搜索某个字符串,并更新所有匹配项。但方法FindText()只返回第一次出现。Gembox查找和更新单元格
我尝试了以下操作,但会导致无限循环,出于某种原因,行和列不会更新到下一个搜索结果。
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;
}
}