tabulapdf / tabula-extractor

Extract tables from PDF files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create interface for Spreadsheet / Table

jeremybmerrill opened this issue · comments

spreadsheet algorithm outputs Spreadsheet objects, the original algorithm outputs Table objects.

We should write an "interface" (i.e. a Ruby module with shared methods, or just a definition of the methods that ought to be defined on both objects) to simplify the API, providing comparison methods, rows, cols, etc. whose output is identical for both.

Do y'all (including my future self) think that an each_cell and map_cells method would be useful on the common interface? That way, if you wanted to, for instance, strip non-alphanum chars or something, you could do that without having to mess around with table.rows.cells and worrying about in-place stuff?