DataTable Variable is null

My DataTable Variable is null - how do I fix this?

There are more than one way to fix this:

  1. Use read range activity to read data from excel to your datatable
  2. Use assign activity to initialize you variable like this: myDataTable=New DataTable()
  3. Use Build DataTable activity to create the table in your variable

I am using a for each row activity and in that I have the read range activity but it’s still not working.

You need to use Read Range before the For Each Row. Maybe you would preffer to use the StudioX instead, here is a quick video working with excel: https://www.youtube.com/watch?v=dxCBkMmB5bQ

Hi, yes I do have a read range before the for each row activity