Write Cell Modern Activity

I am using Excel Modern Activities and trying to write a value using the Write Cell activity. In the Range field, I am using:

Excel.Sheet(“Sheet1”).Cell(“H21”)

However, I need to keep the sheet name and the row index (21 in “H21”, H column name is fixed) dynamic by passing a variable.
The challenge is that the Write Cell activity expects an IReadWriteRangeRef datatype.

Can someone help me achieve this?

Attached SS for ref

@Sudarshan_Sharma1

Store the sheetname and column number to different variables

Example - strSheetName and intColumnIndex

Now use the below expession

Excel.Sheet(strSheetName).Cell(“H” & intColumnIndex.ToString)

Done thanks for the help

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.