How to edit Excel value in cell?

Hi I need help in editing a value in an excel worksheet. When I pull the value from another application it comes out as: “1,000.00-”

I want to get rid of the - at the end of the value as I need to add this value to another number and Excel won’t read the number as anything with the little dash (-). Is there a way to get rid of the dash? thanks

After you’ve read the data from Excel into a datatable, use a For Each Row activity to iterate over the rows. For the column in question (e.g. Amount), set row("Amount") = System.Text.Regex.RegularExpressions.Replace(row("Amount").ToString, "-\s*$", String.Empty) using an Assign activity.

can you show me what you mean. What you put is confusing to comprehend without seeing it.

Processusvierge.zip (8,4 Ko)

This file doesn’t do anything with the values, but the output datatable will contain data that no longer contains the trailing dash.

2 Likes

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