Cell cell = worksheet.Cells.FindStringContains("#region_code#", null);
while (cell != null)
{
string stringToReplace = cell.StringValue;
string newStringValue = stringToReplace.Replace("#region_code#", excelReportEntity.Region);
Style style = worksheet.Cells[cell.Name].GetStyle();
worksheet.Cells[cell.Name].PutValue(newStringValue);
worksheet.Cells[cell.Name].SetStyle(style);
cell = worksheet.Cells.FindStringContains("#region_code#", null);
}<hr size="1" align="left" width="25%"></body></html>