I met a problem that I have a datatable with some columnnames that there’re newline inside of it, and I couldn’t assign the value like below example:
If the ColumnName is “First Name”, and it stored in my Excel file will look like below in one cell:
“First
Name”
when trying assign
DataRow(ColumnName) = “Value”
it got an error apparently there is no specific column existed since I used it the wrong way.
We could Change the Column Names as Required and then access the values using the Proper Column Names. For Instance, Trimming the Column Names can be done as provided in the Post below :
However, In your case along with Trimming, we would need to Remove New Lines with a Space.