hi i’m encountering this issue since yesterday and i still don’t have progress with this
11H2: Can not assign ‘oneyear’ to ‘DepEdDT.Rows(25).Item(0)’.
rows(25) is where i want to write the data
when i run the program with this syntax i encounter error
but when i changed Rows(25) to Rows(24). it works.
the problem is it writes in the wrong cell which is my column name
RemoteException wrapping System.InvalidOperationException: Can not assign ‘oneyear’ to ‘DepEdDT.Rows(25).Item(0)’. —> RemoteException wrapping System.IndexOutOfRangeException: There is no row at position 25.
at System.Data.RBTree1.GetNodeByIndex(Int32 userIndex) at lambda_method(Closure , ActivityContext ) at System.Activities.ExpressionUtilities.IndexerLocationFactory1.CreateLocation(ActivityContext context)
at Microsoft.VisualBasic.Activities.VisualBasicReference1.Execute(CodeActivityContext context) at System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context)
at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance,
Activity1 expressionActivity) at System.Activities.OutArgument1.TryPopulateValue(LocationEnvironment targetEnvironment,
ActivityInstance targetActivityInstance,
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)
— End of inner exception stack trace —
at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance,
ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor,
BookmarkManager bookmarkManager,
Location resultLocation)
How did you create DepEdDT datatable? Probably, the datatable doesn’t have row(25). Can you check number of rows in Locals panel when exception occurs?
Do you use ReadRange activity to create DepEdDT datatable? If so, can you try to add the above AddDataRow activity as it is just after the ReadRange activity? Probably it will work.
hello sir. thank you for answering my questions. we solve the issue in other ways.
the bot don’t read the rows(25) cause there’s no value in it so we indicate my start reading cell and end reading cell solved the problem. thank you very much