What is the common practice to write classes which take some data class and store it to some backend? In my case I have table classes (columns, headers, etc.) which are written to Excel. So I have a class Table with the data and a class ExcelDocument with access operations and basic writing (cells, ...).
Where would I put the code which knows how to deal with Table data and knows how to write that the ExcelDocument? Both might be subject to refactoring at some point.
Do I use
ExcelDocument.write_table(table) or even some need intermediate class?
With the concept "a class should serve just one purpose" I'd most likely write an intermediate class?