How Do I Remove the Spcae From the Datatable Cloumn header?

Hello

I have One Excel File That Contains the Multiple Columns and Sometimes It Also Contains The WhiteSpace at the End of the String that I want To Remove And Want Plain Text Header.
Attached SS

image

Read Sheet Without Headers (DT)

DT.Asenumerable.First().itemarray.Select(function(v) v.Trim).Toarray

Now Take For Each inside that
Assign
DT.Columns(idx).ColumnName=item

put idx variable in For each output

at the end write the data into excel without add headers.

1 Like

Hey @kishan.savaliya,

You can do it using the below method.

Thanks,
Sanjit

2 Likes

Thanks @Sanjit_Pal @Gangadhar_Athili For Solution

1 Like

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