Column does not exist in DataTable

Hello! I am working on a process that updates the values on an Excel file onto website using the framework. I am currently getting the following error: Column ‘Open Amount’ does not belong to table DataTable.

image

The ‘Open Amount’ clearly exists so why am I getting this error? The other column values do not give me this error, only this. I have also read the previous posts similar to this, but I have already tried all the proposed solutions.

I am getting the error on an Assign activity:
Excel_OpenAMT = (in_TransactionItem(“Open Amount”).ToString).Trim

Looking at the Spreadsheet I believe their is a space before “O” in “Open Amount”

I thought so too, but there are no spaces. I checked all of it but there are no spaces in the beginning or end… :frowning:

Is there any range specified in the Read Range? Does it extract columns after this column?

It does. All the columns except that one are extracted properly.

Can you share a screenshot of the workflow.

image

The Excel_OpenAMT variable is a string variable.

As a test, please do the following:

  1. Create a sample sequence with Excel Application Scope ,
  2. Read Range (Uncheck Add Headers) - Keep only this row in the excel.
  3. Use a For Each Row activity and include a Write line within it to print row(9).ToString+“-”+row(10).ToString+“-”+ row(11).ToString and check what is the output.
    4 From Step3 you will be able to figure out the issue.

Is this to check the headers of the table? If so, I did this and confirmed that there are no issues with the headers. :frowning:

Can I have the file with only the headers to test please. Thanks

TestDoc.xlsx (16.6 KB)


I also tried this and it managed to extract the Open Amount value properly but it’s still giving me an issue on the actual process

Seems to work without issues.

HeadersOnly.xaml (7.1 KB)

Please run your workflow in Debug mode and check what the in_TransactionItem holds also check the TransactionData to see how the data table looks like.

1 Like

Extract data seperately one by one column but start element should be first data of the column and last indication should be last data of the column same way you can extract all the column then go to metadata option just replace those name of the column how you required ( column1 replace bye required column name )

Try sure it will work