Extract Data Table from HTML

Hi! Mates.

May I know the exact reason?


Source: Extract data tables from HTML

Message: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Exception Type: System.ArgumentOutOfRangeException

RemoteException wrapping System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at lambda_method(Closure , ActivityContext )
at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context) at System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context)
at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity1 expressionActivity) at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor)
at System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance targetActivityInstance, ActivityExecutor executor, Object argumentValueOverride, Location resultLocation, Boolean skipFastPath)
at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate) at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)


where are you getting this error? for which activity?
are you using any enumerable type variable’s value
it seems, the index used for a variable doesn’t exist.

To check try debugging the file and t the time of error, check local panel for all related variable’s value

1 Like

Hi! @rahulsharma

I am getting this error from Extract data table from html activity.

UiPathTeam.ExtractDataTablesFromHTML.Activities This is the package i’ve used to extract the tables.

and this is the HTML text I am passing


  Where v_mailMessages is a variable which is the type of System.Collections.Generic.List<System.Net.Mail.MailMessage>



I Guess you re extracting datatable from html body!

Check with the count of mail and then proceed to extract the html table

And also check with the reference thread below!


1 Like

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