Cannot write range after Extract Document Data (Document Understanding)

Hi All,

I am using activity Extract Document Data under Document Understanding activity to extract data. The output is called ExtractedData_Result. Then, i want to write extracted data in excel.

ExtractedData_Result.DocumentMetadata.ResultsAsDataTables(0) for first table @ simple fields

ExtractedData_Result.DocumentMetadata.ResultsAsDataTables(1) for second table @ table

^Both datatype for above is datatable

However, i faced error when write range of the extracted data,

“Write Range Workbook: Unable to set cell value to 1600”

1600 is the first table

Write Range Workbook: Unable to set cell value to -19 -13 -25 -25 -12 -30

Above is the result of second table.

@aqiffm

Can you show some screenshots if activity it s properties and the error message

Cheers

@aqiffm

Open the data from locas panel …looks like there is only one row…try to remove add headers and check

Aso in locals panel open exception details to know full exception message

Alternately just to verify try to write the data using the excel app scope and check

Cheers

Hi,

It may be caused by mismatch data type of DataColumn.

Can you try either of the following?

  • Write it into csv file Using WriteCSV activity then convert it the csv to xlsx using ReadCSV and WriteRange OR UseExcelFile directly.

  • Create new DataTable and copy all data into it using ForEachRow etc.

Regards,

@Anil_G and @Yoichi , thank you for your input. I have solved it by using Assign activity.

dtFirstPage = ExtractedData_Result.DocumentMetadata.ResultsAsDataTables(0)

Then, write range normally, then it solved the issue.

1 Like

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