Unable to Convert Output from "Extract Document Data" to DataTable

Hello UiPath Community,

I am currently working on a project where I am using the “Extract Document Data” activity to extract values from invoices using the predefined invoices model. My goal is to eventually output the extracted data into an Excel file using a loop.

However, I am facing difficulties with converting the output from the “Extract Document Data” activity into a DataTable. According to the documentation, there should be an option to select ResultsAsDatatable as an output for the “Extract Document Data” activity, but I am unable to find this option in the activity properties.

Here are the details of my setup:

  • Activity Used: Extract Document Data (with predefined invoices model)
  • Issue: Unable to find the ResultsAsDatatable option to convert IDocumentData to a DataTable.

Steps I have tried so far:

  1. Checked the official UiPath documentation and forums for a solution.
  2. Tried to manually convert the IDocumentData to a DataTable but without success.

Questions:

  1. Is there an alternative method to convert IDocumentData to a DataTable?
  2. Has anyone else encountered this issue with the ResultsAsDatatable option not appearing, and if so, how did you resolve it?
  3. Are there any additional activities or packages that I need to install to access this functionality?

Any guidance or suggestions would be greatly appreciated. Thank you for your help!

@douglas.chan

it will be available in the properties…

just drag any activity after it and click plus icon and click use variables and expand the docdata variable you would see resultasdatatables option which you can select

image

Alternately you can open advanced editor and use the below formula…Note that it gives list of datatables…you need to iterate through it

extracted.DocumentMetadata.ResultsAsDataTables

to access first table extracted.DocumentMetadata.ResultsAsDataTables(0)

Hope this helps

cheers

1 Like