aspose.Cells putValue

in continuation to earlier message... please find below the sample code snippet

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>

well, the issue has been resolved. regret the discomfort

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We strongly recommend you to download and use the latest version:
Aspose.Cells
for .NET v7.1.2.6

and upgrade your code.

It’s good to know that you were able to sort out the problem.

If you get any other question or face any issue, please feel free to let us know, we will help you asap.