How the table is read
Converting a picture into a spreadsheet takes three steps. First a text detector, PP-OCRv5 from the open-source PaddleOCR project, finds every line of text on the page. If the picture is slightly rotated, the page is turned upright by the average slant of those lines, which keeps rows straight. Each text line is then cut out and read by PP-OCRv6, a recognition model that knows around 18,000 characters. Finally, the words are placed into rows and columns, which is the part that turns plain text recognition into a usable table.
Tables with and without lines
Most tables have ruling lines, and those are the most reliable guide. The tool looks for thin dark lines running across and down the page, joins pieces of the same line that are interrupted by antialiasing or JPEG artefacts, and keeps the lines that cross each other to form a grid. A boundary that is missing between two neighbouring cells means they are merged, so a cell spanning two rows in your image becomes a merged cell in Excel. Coloured header rows count too: the edge of a filled area works like a line. Text that sits above or below the grid, such as a title or a note, is added as extra rows.
When a table has no lines at all, or only a rule under the header, columns are found from the layout instead. Lines of text that share a height form a row. The tool then looks at which horizontal positions are covered by text in most rows; the gaps that stay empty all the way down are column boundaries. Text the detector read across two columns, which happens when the gap between them is narrow, is split at those boundaries.
Getting the cleanest result
Crop the picture to the table before converting it if the page also contains photos or other text, for example with our crop tool. For a long table on a website, take a full-page screenshot rather than a phone photo of the screen. If you only need the words and not the grid, use Image to Text, which keeps the reading order of paragraphs. To send the converted pictures together as one document, JPG to PDF combines them into a single file.