Copy from Clipboard

Hello Everyone,

I am learning UiPath and doing an exercise in which I need to copy the value from the Windows calculator and paste it into UiPath and use that value to store it in Excel.

I have tried using Get Text, which didn’t work. I tried to Get From Clipboard activities and stored the output as var and tried to use that, but I am getting the below error.


Source: Write Range

Message: Object reference not set to an instance of an object.

Exception Type: System.NullReferenceException

System.NullReferenceException: Object reference not set to an instance of an object. at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Please help me solve this.

Thank you,

Hi @ramya.rajendran ,

This Error is occurred in write range. It seems like there is no data in datatable which you want to write to a excel file.

Hi @ramya.rajendran,

Welcome to community.

It would be beneficial to proceed with caution. First, print the value you read using the Write Line activity and make sure it is not empty. Also, UiPath expects a value in string format. Make sure that the returned value is in string format or add .ToString to your variable.


Hello @ramya.rajendran Welcome to UiPath Community
Get from Clip Board is an activity used to get the value from the clipboard which we copied.

The Error indicates there is no value in the variable. Hence, there is no value to get from the clipboard.

After changing the type to string, it worked.

Thank you again,

1 Like

Hi @ramya.rajendran ,

As already discussed, I have done a workflow based on your requirement. Please do check and verify.
Calculus.xlsx (9.0 KB)
Test.xaml (21.7 KB)

Hope this helps.

1 Like

Thank you so much Harshith


1 Like

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