Escribir en Fecha de inicio: No hay ninguna fila en la posición 24

Description

Hola, tengo un problema en el momento de ejecutar un archivo en excel para que escriba en un campo todo lo que contiene la fila “Fecha_inicio” pero me sale este error y así tengo la configuración:

  1. TablaDatosExcel.Rows(NumeroFila).Item(“INICIO_FECHA”).ToString

  2. System.IndexOutOfRangeException: No hay ninguna fila en la posición 24. en System.Data.RBTree1.GetNodeByIndex(Int32 userIndex) en lambda_method(Closure , ActivityContext ) en Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context)
    en System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context) en System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity1 expressionActivity)
    en System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor) en System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance targetActivityInstance, ActivityExecutor executor, Object argumentValueOverride, Location resultLocation, Boolean skipFastPath) en System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate)
    en System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary`2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
    en System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
    — Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción —
    en UiPath.UIAutomationNext.Activities.NApplicationCard.OnFault(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
    en System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
    en System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Link

Date

2024-07-10

Related UiPath products

Test Suite

@Maria_Alejandra_Hurtado_P ,

This could be because of the column name INICIO_FECHA you mentioned in this code is not available in DataTable.

TableDataExcel.Rows(RowNumber). Item("INICIO_FECHA"). ToString

Check column availability in locals/Immediate panel.

Thanks,
Ashok :slight_smile:

1 Like

Hi @Maria_Alejandra_Hurtado_P ,

It shows that you are trying to access an Index which is not present meaning the number of rows in datatable is less than 24 .

Could you confirm on the number of rows present for the datatable TableDataExcel ?

1 Like

Tiene exactamente 24, contando el encabezado támbien.

@Maria_Alejandra_Hurtado_P ,

If the First Row is considered as Headers, then you would have 23 rows not 24. So, you could try with indices as 23 and 22.

This way we will be able to identify the datatable total rows and how you have configured your Read Range activity.

Do note last row index is always less than last row number (Datatable Row number).

1 Like

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