The Gtk List widget provides a lot of functionality for the display (and editing) of most sorts of data. Getting the data out of the tables as a list is straight forward too. Data is inserted into the list on a row basis and how it should be retrieved. The following simple function shows how each row it iterated and the data pulled out of each cell. The contents are then appended to a list which is written to disk.
The attached script contains a working implementation.