Cannot implicity convert type 'string' to 'System.Data.DataTable'

Hi.

I’m working on an automation that saves a variable (registration number) from a pdf and then will be inserted in an excel row. I have a “read pdf with ocr” activity that search through the pdf and looks for a registration number and saves it as a variable. However, I get a error message because the variable is set to a string and it needs to be a System.Data.DataTable but then my “assign” activity doesn’t work. I don’t know how to solve this.

Thanks
![UiPath error|690x358]


(upload://5Wl7sVFxCPmSsuXXhVQ7mbK7QxZ.png)

one of many options:

prepare an empty data table - e.g with Build data table and configure the needed data columns
populate the datatable
and finaly use it for the write datatable to excel

Hi,

How about using WriteCell activity instead of WriteDataTableToExcel?

Regards,

1 Like

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