Option Strict On disallows implicit conversions from 'Object' to 'System.Data.DataTable'

I have declared variable "filelist " as system. Object to get the input file Pdfs. However when I try to loop in for each, getting the error, cannot convert to system. Data table. Attached screenshots. Please advise !

Hi,

Can you try For Each activity instead of For Each Row?

Regards,

1 Like

It worked ,Thank you! what is the difference between both? Sorry, I am just a beginner!

Hi,

For Each Row activity is described in official document as the following.

Executes an action once for each row in a specified DataTable variable.

So, it’s for iterating each row in a DataTable.
If we want to iterate each item in a collection, we need to use For Each activity.

Regards,

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