Built DT, Integer recognised as general by Excel?

Hi Guys,

I built a DT, 5 columns consisting of 3 strings and 2 integers.
One of the string colums is a date column.
When its written to an excel sheet which is entirely formatted as general I was under the impression the integers would be recognised as such.
Excel sees the date as indeed a date even though ive set it in the build dt as a string it changes the column to a date column, perfect.

The original text im reading is lets say 1 - 1, this is in Excel formatted as text.
This particular column gets split in Uipath, added to the built DT as seperate columns, set as integers.

It works fine, can do operations within excel, just wondering why its seen in Excel as general and not integer as stated in the built dt.

I can preformat the column to be written as number or format the column as number after the write but just wondering why ?


in building a DT have you set the variable you need to extract as Int32?

you need to convert your variable from a string to an integer. you need to change the variable type to Int32.


In Excel I have this cell β€œ2 - 2” , this is formatted in Excel as text.
This gets read in uipath, saved into a dt var.
I built a dt with preformatted columns, yes they are integers.
I split the β€œ2 - 2” into β€œ2” β€œ2”.
These get added to the built dt in seperate colums, then written to Excel.


one reason could be that The exported data, is stored in a DataSet variable. The data contained in the DataSet object only contains the value itself from an ExtractionResult , without the reference and confidence level.

We convert this variable to a spreadsheet using excel activities.

Hi, yeah I can quite easily use the Excel activities to sort but was just wondering if I went wrong somewhere, it is me afterall :crazy_face:

Below is the original in Excel, formatted as text, this is column 3 which gets split to columns 3 and 4 in the built dt.

Screenshot 2022-09-19 193727

This is the row written to the built dt, is it the .ToString perhaps ?

Screenshot 2022-09-19 194150

Thank you :grinning:

1 Like

haha no worries. you’re on the right path!