Help with DataTable.Rows(someIndex).ToSting not returning extected Data value

I have an issue- my goal is to read a column ( with no column header) from excel and write the data to .txt file.
Currently my work flow is writing System.Data.DataRow instead of the data.

Below is a screenshot from my excel file
image

in Read Range, I ensured I did not check “Addheadres”
image

In my For Each Row in Data Table, I had declared an index
image

In the Assign with the for each loop. I assigned value to declared variable as sheen below:
image

Instead if the values in the excel col, the below is what mu output looks like:
image

that behaviour is correct:

  • dtDataVar.Rows(IntIndex) returns a DataRow
  • a DataRowVar.ToString() returns the fully qualified Classname (what we see in the logs)

Maybe you are interessted on the first column and want to access it by the column index
DTForAddedHcpcsCodes.Rows(idx)(0).toString

Also you can debug and trace:

1 Like

@ppr passing the columnIndex was the missing piece. Thanks

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