For Each activity in version 23.4.1 to use type argument as

In “For Each” activity of dependency version 23.4.1 we are not able to change the type argument to data table. It becomes an issue when we try to loop the dataset to get the table data out of it using For Each. You could see in the below images when we try to access the item (ItemInstance) in the body of For each to populate the .tablenames as sheet names. It doesn’t populate. At the same time it also throws an error “cannot be converted to object to datatable type” when we use the item (ItemInstance) in the datatable parameter of write range as the default type argument for for each in 23.4.1 is system.object. This activity is created in the project by selecting windows compatibility. We could download the UiPath.System.Activities to 22.10.4 and use it without any issue. Just wanted to check in the version 23.4.1 can we expect the same as 22.10.4 version


Hi @saravana.kumar, welcome to the Community.

Please change the type argument of the For Each activity to System.DataTable. Also, try to change the sheet name to ItemInstance.ToString.

Hope this helps,
Best Regards.

there was two shifts in the past

Unfortunately the last step is a little bit blocked by “unforseen behaviour”, but we do expect that it will work soon as usually

Dependening on your studio version update/downgrade the UiPath.System.Activities package till it is working.

Feel free to provide details as

  • Studio Version and Edition (Community, Enterprise)
  • Used Programming Language
  • Used Compatibility (Windows, Windows Legacy)
  • Refrenced Package Version of UiPath.System.Activities

and give a feedback here

Hi Peter,

Please find the details you asked for.

Studio Version and Edition (Community, Enterprise) → It is Pro Trail.
Used Programming Language → VB is selected.
Used Compatibility (Windows, Windows Legacy) → Windows is used.
Refrenced Package Version of UiPath.System.Activities → Issue with version of UiPath.System.Activities 23.4.1


then we would recommend to downgrade the UiPath.System.Activities till the issue is solved for 23.X.Y Level

Hi Arjun,

Changing the type argument from “object” to “data.datatable” is not available in 23.4.1 version of UiPath.System.Activities dependency as how it is used to be available in 22.10.4 version. So couldn’t use other types of argument. So have downgraded the dependency to 22.10.4 and moved on.


Sure Peter. Thanks for your reply.


Convert currentItem to the prefered typeargument within the For each. Then refer to the new converted variable when use activities