i need to pass data table variable to python script , i getting below exception.
Main.xaml: (2) : error BC36914: Cannot infer an element type, and Option Strict On does not allow ‘Object’ to be assumed. Specifying the type of the array might correct this error.
This error is because it can’t know the datatype of your array. It’s not because you have put DBTable in there (although I’m not sure if this will work).
Try this in your expression:
New Object(){DBTable,inputExcelTable,UseExceptedRatio,strOutputPath}
By the way, this solution is easily found by searching the forum for the error message “cannot infer an element type”
Because the array elements are now all datatype Object, you may have to convert them from object back to their actual datatype - within the the python code. I don’t really know python, so I can’t help beyond that suggestion.