lets assume you have a datable in place with the columnnames having the beginning ending spaces.
so with a for each you can do name correction as following
Statement:
item.Columnname = itemColumnname.trim()
Dont forget to configure the typeargument of the for each to the datatype Datacolumn