Extract key fields - entities and their value in excel format

J_Horna 41 Reputation points
2023-01-07T13:08:00.243+00:00

The data that is currently shown in a .json file, I need to extract them in an orderly manner and following the logical sequence of the location of the entity and its value within the document in excel format
277050-logist-docs.pdf277029-logist-docs.pdf

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,920 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 48,541 Reputation points Microsoft Employee
    2023-01-30T16:49:27.1933333+00:00

    @J_Horna With the previous versions of the API there was an option to download the result as an excel from FOTT tool but with the current version of FR studio excel is one of the input formats of document type that is supported and the option to download the result as excel is not available. I think you should be able to process the result to get the table data line by line using this snippet from the examples and then write the same to a dictionary and load them as CSV file.

            for region in table.bounding_regions:  
                print(  
                    "Table # {} location on page: {}".format(  
                        table_idx,  
                        region.page_number,  
                    )  
                )  
                lines.extend(get_lines(table.spans, get_page(region.page_number, result.pages)))  
      
            print("Found # {} lines in the table".format(len(lines)))  
            for line in lines:  
                print(  
                    "...Line '{}' is within bounding polygon: '{}'".format(  
                        line.content,  
                        line.polygon,  
                    )  
                )  
    

    The complete example, should help you determine the logic to get each line and then create the excel or CSV equivalent.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.