CurrentRow properties

Hi all,

Complete Newbie, i have a problem for Currentrow properties - I need to copy/paste range Source cell B1 to destination B1. I do not want to do a datatable as i do not need to add row or create variables.

I simply wanted a source path location. I tried source:
Currentrow.index or
currentrow.index(1) or
excel.sheet(“sheet1”).range(“B”+currentrow.index(row))

All 3 above doesn’t work and gives error messages. Can assist to advise what is the correct workable source path for the above? as i am looping and do not want to do a dataTable. Thanks!


image

Regards
TTYF

@TTYF

Say you want to copy from sheet1 to sheet2 each column in the loop then use as below…you can copy whole row as well

Excel.Sheet("Sheet1").Range(currentRow.ByField("FieldName").Address)

Sheetname is the difference between source and destination

Hope this helps

cheers

1 Like

Hi Anil, i tried yesterday and worked. Today when I tried, it gives error for the following

Excel.sheet(“sheet1”).range(currentrow.byfield(“fieldname”).address)

Error msg: option strict on disallows implicit conversation from UiPath.excel.rangevalue to
UiPath.excel.ireadwritecellref

Are you able to advise resolution?

Is it advisable to switch off option strict?

@TTYF

Can you show that error…we cant switch it off…but it shpuld not show this

Cheers

@TTYF

Your expression is wrong…please use the exact expression…you are usinng a wrong one…what you pasted in your comment and what you used in acreenshot is different…you used only address…this need to be enclosed in the remaining expression

Cheers

1 Like

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