Re: How to remove the letter “A” from all values in the data table

I’m sorry to post many times.
I want to delete the letter “A” from all values ​​in the data table.

I tried this method but failed with GENERATE DATATABLE ACTIVITY.
The cause seems to be because the data table value contains “,”.
Is there any other solution?

use the generate datable activity with “,” as the delimiter.

1 Like
The column has become one. What was wrong?

can you show the screenshot of your generate datatable inputs

May I know how the datatable looks like
Cheers @tera

1 Like

Enable CSV parsing and check once.

1 Like

It ’s hard to explain.
It lost regularity.

Have a Look on following Post as IT IS closed to your scenario. Instead of trim you Could Go with replace function

Removal of Trailing Spaces from Datatable - #11 by ppr

1 Like

I didn’t know much about LINQ, so I couldn’t understand how to implement LINQ.

No Problem as we all here will help you.

give a try on following, replace the datatavar with your variablename:

(From r In DataTableVar.AsEnumerable
Select ia = r.ItemArray.toList
Select ic = ia.ConvertAll(Function (e) e.ToString.Replace(“A”, “YourReplacementValue”).toArray()
Select dtCorrected.Rows.Add(ic)).CopyToDataTable()

the text replace approach is also a good option for solving the task. And for beginning doing the replacement with for each row and an inner for each iteration over the columns should work as well

Let us know if you do need more help. Feel free to share some sample data with us


Sorry for the rudimentary question.
Is this entered in “Assign”?

Yes is used within an assign Activity. The Return is configured under the TO section and is of Datatype Datatable

The variable dtcorrected ist a Second Datatable. ITS recommended to initialized it before running the linq within an assign and using the Statement yourorigindatatablevar.clone

1 Like

I don’t understand how to write Value.
An error “’)’ is required” occurs.

@tera in this Part you are coding the replacement value from A. You want to remove A, so replace with “”, the empty value.

IT seems to me that the closing ) for the convertall function is Missing, so give a try on
The Part replace (“A”,""))

An error will occur if executed.

This is the error message.

Error is coming from a variable that is Not initalized. Is out_dt correctly initialized. IT was told to do it with the Clone statement