Hello,
Thank you for your inquiry.
Sorry, I'm not entirely sure about your expected effect. You can find them and add some settings just like my test code and my input/output Excel document. If this is not what you expected, you can provide your test input document and the desired result effect, so that we can investigate more accurately.
- Code: Select all
Dim workbook As New Workbook()
workbook.LoadFromFile("in.xlsx")
Dim worksheet As Worksheet = workbook.Worksheets(0)
'Get a specific range of cells
Dim searchRange As CellRange = worksheet.Range("A1:E19")
'Find cell with specific values within a range of cells
Dim cellFound As CellRange = searchRange.FindString("40", True, True)
'Replace the value of a cell with another value
cellFound.Text = "find"
'Set the background color of cells
cellFound.Style.Color = Color.Yellow
'save file
workbook.SaveToFile("out.xlsx", ExcelVersion.Version2016)
workbook.Dispose()
Sincerely,
Amin
E-iceblue support team