Converting Decimals in a DataTable

Hey there,

  1. I have a csv
  2. I read it into a datatable
  3. i output the datatable
  4. i generate a datatable
  5. i write range into a new xlsx file

Promlem: The Number has a comma as decimal.

Step1:

Step3:
image

Can someone help?
Thanks a lot!

Hello @Katarina,

After the step 2 you can write it to .xlsx file right, also instead of using read CSV activity, you can try to use Excel Scope to read the csv file.

I cannot use Excel Activities for CSV. So I need to read CSV and output it into a datatable. Once I put it into a datatable, I have the format problem.

@Katarina Find Below Expression.
CurrentRow(“Column Name”).Tostring.replace(“,”,“.”)

But why your are using Generate data Table Activity?
Instead you can directly read csv file and Use Write range to Convert that into “.xlsx”.

Regards,
Saloni

1 Like

Thanks!

I loop trough the datatable and replace “,” by “.” and replace “”“” by “” :slight_smile:

But when I read csv, the output is a datatable.

I use Generate Datatable because before I was dealing with this issue:

Can you try it By Following.

  1. Read csv
    2.Pass output DataTable variable into write range with “.xlsx” extension.

Let me know if still any issue comes Up.

Regards,
Saloni

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