How to Clear the Unwated Characters from a column?

Hello everybody,

I need to remove the “SVE-0” character from the “Name” column.

I even got a solution through a for each and substring, but as the column has many rows, the process was long, is there any solution that applies the correction to the entire column faster?

Dyna.xlsx (154.4 KB)

Hi @Israel_Silva

You can try with this LINQ expression

Dt.AsEnumerable().Select(Function(a) Dt.Clone.LoadDataRow({a.Field(OF String)("Name").ToString.Replace("SVE-0","")},False)).CopyToDataTable

Regards
Gokul

Your solution worked, but the following message occurred:

Write Range: Cannot write to the target range because it has hidden rows. Remove any filters or unhide rows and try again.

Have you tried with Excel Application scope and followed by Write Range

Check out this thread

Regards
Gokul

Unfortunately, I haven’t been successful yet. Even applying the solutions described in the link

Have you tried to write the output data in the different Sheet or Workbook? @Israel_Silva

Output data below:

Code below:
ReadExcel.xaml (9.7 KB)

Hi @Israel_Silva

Check out this XAML file

Find And Replace.xaml (11.3 KB)

image

Regards
Gokul

Hi @Israel_Silva ,

Similar to @Gokul001 's Suggestion, but instead of using Read Range, we might be able to get the Total Count of the Row using the Find First /Last Data Row and then use the Find /Replace Value Activity.

image
image

The above is assuming the Excel Column name of Nome Column is already known (i.e E), if not known we should also be able to get the column name.

Let us know if you are able to get the required output using the provided suggestions.

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