Format Excel Column Type to Number

Hi All,

I have a data table which has one of the column type as String.When I am trying to write that Data Table to Excel, my column value is getting stored as text.But I want that column type as Number.So, I wanted to change that particular column format to Decimal/integer before writing to Excel. Could you please suggest solution.

Here, I am trying to install a package “UiPath.Excel.Activities.Business.FormatRangeX” as I’ve seen in uipath Docs site. But unfortunately I am unable to find this package anywhere.

@emounica - Could you please check this post…

Hi @emounica

You can apply this way
After reading the excel with read range and store in dt1,

Use invoke code with dt1 as In/out argument

dt1.AsEnumerable().ToList(row(ColumnName)= Cint(row(ColumnName)))

Then write the data in excel using write range.

(Note : for the columnName put the column name u need to format)

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

Hi Prasath, Thank you for the solution. This one is working successfully.

1 Like

@emounica - Glad to know it worked. Please mark my post as solution , as it help others…

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