Changing the Data Type of a column in a Data Table

Hi Uipath Brothers and Sisters

Often after the read range activity, the data type of the columns which are meant to be Int32 are presented as String instead, which make the Filter Data Table activity non-functional.

Was wondering is there anyway to change the Data Type of columns in a Data Table?

Thanks a lot!
Tower

Hi @Towerboy,
As of now one workaround i can give.Simply change the type of that particular column to number which u are using in filter data table activity.
And for comparison give value like 150.00
DatatypeIssue
Here the type of column"NotOnUsCheck" is set to number in the excel itself.It wil work.
Try once.Meanwhile i will find another solution for it.

Hi @Towerboy,
You can also use “select” method to filter.With this you wont be getting issues of datatype.
Create a variable of type datatable and assign to "DatatableName.Select(“ColumnName Operator Value”).CopyToDataTable "
Hope this helps.

3 Likes

Hi @Towerboy

If you are aware about the number of columns and their datatypes then you can just create the data table using the activity Build Data Table with needed data type and then use the same data table while using read range. That will help you to preserve the data type.

Thanks

Thanks alot Chetan94k

Simply use dt.selet would change it to a array of rows.

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