Excel Data Table Error!

Hi everyone, please help with this error:

I have an data table I extract data from..e.g.
here is the column I want to extract from -


Here is it in the excel file:

But with the error I am getting it says it’s not in the datatable, please assist

Hi @Anelisa_bolosha1,
This usually happens when the column name in the DataTable is not exactly the same as the Excel header.

Even if it looks correct in Excel, UiPath reads the header as-is. Many times the header contains hidden spaces, line breaks or extra characters, so "Intermediary" in the workflow doesn’t match the real column name in the DataTable.

Please check these:

• Make sure Add Headers is enabled in the Read Range activity.
• Print the column names to see what UiPath actually reads:

For Each col As DataColumn In dt.Columns
Log Message col.ColumnName
Next

You’ll likely notice an extra space like "Intermediary " or " Intermediary".
After fixing the header (or trimming the name), the error should be resolved..

1 Like

Hi @Anelisa_Bolosha1

Check for extra spaces in the Excel header. If it’s "Intermediary " (with a space), UiPath won’t find it.

Also, make sure Add Headers is checked in your Read Range activity and that your range includes column M.

1 Like

@Anelisa_Bolosha1

It’s due to the space after column name in your datatable. Eighter remove the space from excel or add space in your code.

1 Like

Just anoher note,

1 Like

Got it thank you, there was space after the word ‘intermediary’

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