Extract-Table-Results-to-Excel
Command Description
Save the results of Screen Form OCR, Image Form OCR, and PDF Form OCR into an Excel
Command Prototype
Mage.ExtractTablesToExcel(jsonRet,filter_text,sPath, appType)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
jsonRet | True | expression | jsonRet | Output variables from "Screen Form OCR", "Image Form OCR", "PDF Form OCR" |
filter_text | True | boolean | None | Filter the non-table text in recognition results. Select "No" to write the full result to the Sheet1 page in Excel. Select "Yes" to write each recognized table in order to a single sheet page |
sPath | True | path | '''C:\Users''' | Path to the Excel file. If the file doesn't exist, the command will create a new file in the path |
appType | True | enum | "Excel" | Open with Excel or WPS Excel |
Demo
Dim jsonRet='' // Table recognition result, you need to use the result of self-recognizing the specified picture for assignment
Dim sPath='''''' // File save path
TracePrint "--------------------Extract table results to Excel--------------------"
// --------------------------------------------------------
// [Remarks] Extract table results to Excel
// Input parameter 1:
// jsonRet--table recognition result
// Input parameter 2:
// filter_text--filter non-table text
// Input parameter 3:
// sPath--file path
// Input parameter 4:
// appType--Open method
// Command prototype: Mage.ExtractTablesToExcel(jsonRet,filter_text,sPath, appType)
// --------------------------------------------------------
Mage.ExtractTablesToExcel(jsonRet,false,sPath, "Excel")