Excel Copy Paste Only Values Not supported by UiPath

excel
activities
studio
uipath

#1

Hi Friends,

I am using the below vb.net code in UiPath ‘Invoke Code’ activity to copy and paste only the values of excel cells from one workbook to another workbook.

xlWorkSheet1.Range(SourceCellValue).Copy(xlWorkSheet2.Range(SourceCellValue)).PasteSpecial(XlPasteType.xlPasteValues, XlPasteSpecialOperation.xlPasteSpecialOperationNone, False, False)

I am getting below error.
“Operation Strict On disallows late binding”

Could someone tell me what is wrong with my code?

Thanks,
Devi


#2

Have you tried execute macro activity?


#3

Hi @farhan94 ,

I got this worked .

Just i had to change 1 line of code from
xlWorkSheet1.Range(SourceCellValue).Copy(xlWorkSheet2.Range(SourceCellValue)).PasteSpecial(XlPasteType.xlPasteValues, XlPasteSpecialOperation.xlPasteSpecialOperationNone, False, False)

to

xlWorkSheet1.Range(SourceCellValue).Copy()
xlWorkSheet2.Range(SourceCellValue).PasteSpecial(XlPasteType.xlPasteValues, XlPasteSpecialOperation.xlPasteSpecialOperationNone, False, False)

this.

Thanks,
Devi


#4

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