I am reading an Excel sheet into a data table dt1 which has column Names and data rows.
Trying to get data at cell B2. I could read cell B2. I am also trying to do dt1.Rows(0)(columnName). But the column Names have spaces. How do I remove space in the column name?
Hi @A_Learner ,
dt1.columns(0).ColumnName = dt1.columns(0).ColumnName,Replace(" “,”")
where 0 is a first column index.
If you want to do for all then,
Pull a for each and perform the following.
Hope it helps.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.