This behavior is caused by differences in project compatibility or Excel activity versions between the two workflows. One treats CurrentRow() strictly as ExcelValue, the other allows implicit conversion. Explicitly assigning New UiPath.Excel.ExcelValue(matchedRow) or using an Object/ExcelValue variable fixes it consistently across projects.
This issue happens because you are using Modern Excel activities In For Each Excel Row (Modern),
CurrentRow(“VAT Price 6%”) is not a String.
Its data type is UiPath.Excel.ExcelValue.
So when you try to assign-
1 a String variable (matchedRow)
2 or even a hardcoded "12”
Try this
CurrentRow(“VAT Price 6%”)
Set the value ExcelValue.FromObject(matchedRow)
If you are assigning a number use this
@elwin.kong
ExcelValue.FromObject() is available only in full Modern Windows projects.In Windows-Legacy or mixed projects, it is not supported.
Instead of assign activity you can check with write cell activity
CurrentRow(“VAT Price 6%”)
Value - matchedRow