debian-python-pyexcel-io/pyexcel_io/plugin_api/abstract_sheet.py

22 lines
606 B
Python

class ISheet(object):
def row_iterator(self):
raise NotImplementedError("iterate each row")
def column_iterator(self, row):
raise NotImplementedError("iterate each column at a given row")
class ISheetWriter(object):
def write_row(self, data_row):
raise NotImplementedError("How does your sheet write a row of data")
def write_array(self, table):
"""
For standalone usage, write an array
"""
for row in table:
self.write_row(row)
def close(self):
raise NotImplementedError("How would you close your file")