CSV Column Format Change

Hii Team,

We have a csv file

How do we change column format to no for a csv file


Amt | P_No
668 | 889.82

We have for Excel for changing the column format

For csv files how to we change the column formats

Your suggestions are appreciated

Thanks in advance


Can you clarify your requirement?
CSV file doesn’t have information for type in each column.

If you need to handle it as numeric type in datatable after reading, GenerateDataTable with AutodetectTypes option may help you as the following.

Sample20231030-1L.zip (2.6 KB)



Cav file by default does not store those properties in it…

When reading data into datatable we can cast the column if needed or if all the column values are numeric(that is no blanks or other values are present) then the column will be auto casted to number…if not we can cast the column to number as well by replacing the non numeric values in the column with 0


Hi @Yoichi and @Anil_G

We are reading a csv file
Example : dt1

In this file the column are given as general for all

How do we update column format to numeric to the columns in which its required

We will again be writting this data back to csv file


As we mentioned, csv file doesn’t have coulmn data type. If you have expected result, can you share it?
If you want to change datatype of column in datatable, basically we need to add new column then convert data into it and remove old one.
Or use the above GenerateDataTable activity.


Hii @Yoichi

Actually in one of the columns the values that is pasted in Excel csv file is getting printed as below


Instead of



I think it’s excel matter.
If you need to display the value in excel, can you try to use Read CSV activity then write the datatable using WriteRangeWorkbook activity?

FYI, the following may also help you.


Hi @Yoichi

We are again writing it to csv file


If we write the data to excel sheet correctly, we will be able to read it to datatable again correctly.

Or do you want to write datatable to csv without via excel sheet?



If you open a csv that is written in a specific format the value will be stored in same format…

When you open csv in excelit would generally display in general only…csv does not savethe column formats visually…but when you read ideally youwould get the actual value only

Hope this helps


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