I just tried to run the excel activity but no success. occured an exception. plz help me to resolve it

Error ERROR Validation Error System.ArgumentNullException: Value cannot be null. (Parameter ‘source’)
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable1 source, Func2 selector)
at UiPath.Excel.Activities.Business.RemoveDuplicatesX.CacheMetadata(CodeActivityMetadata metadata)
at System.Activities.AsyncCodeActivity.OnInternalCacheMetadata(Boolean createEmptyBindings)
at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList1& validationErrors) at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack1& activitiesRemaining, ActivityCallStack parentChain, IList1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback) at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors)
at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
at System.Activities.Validation.ActivityValidationServices.InternalActivityValidationServices.InternalValidate()
at System.Activities.Validation.ActivityValidationServices.Validate(Activity toValidate, ValidationSettings settings)
at System.Activities.Presentation.Validation.ValidationService.CoreValidationWork(ValidationReason reason, CancellationToken cancellationToken) Main.xaml

Hi @BReddy_m

System.ArgumentNullException , suggests that a null value is being encountered where it’s not expected within the code. Check your inputs to excel activity.

Also for better understanding can you add screenshot of the workflow where you are getting the error.

Hope this helps :slight_smile:

@BReddy_m

  1. Check Input Data: Ensure that the input data you are providing to the Remove Duplicates activity is not null. Check if you have a valid DataTable or Range specified.
  2. Check Remove Duplicates Activity Configuration: Open the properties of the Remove Duplicates activity and review the settings. Ensure that the input DataTable or Range is correctly specified. Also, check if there are any properties that might be set to null.
  3. Update UiPath Package: Make sure that your UiPath.Excel.Activities package is up-to-date. Sometimes, issues are resolved in newer versions of the package.
  4. Recreate the Remove Duplicates Activity: Delete the existing Remove Duplicates activity and recreate it. This can sometimes resolve issues related to activity corruption.
  5. Verify Source Data: If you are using the output of a previous activity as the source for Remove Duplicates, make sure that the source activity is producing valid data.
  6. Check for Empty DataTables: If you are working with DataTables, make sure that the DataTable you are using is not empty. An empty DataTable might lead to null values.
  7. Debugging: Use UiPath Studio’s debugging features to step through your workflow and identify exactly where the null value is coming from. You can use the “Breakpoints” and “Step Into” features to inspect variables and values.

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