Coverage for /home/martinb/.local/share/virtualenvs/camcops/lib/python3.6/site-packages/pyexcel_io/plugin_api/abstract_writer.py : 36%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from .abstract_sheet import ISheetWriter
4class IWriter(object):
5 def create_sheet(self, sheet_name) -> ISheetWriter:
6 raise NotImplementedError("Please implement a native sheet writer")
8 def write(self, incoming_dict):
9 for sheet_name in incoming_dict:
10 sheet_writer = self.create_sheet(sheet_name)
11 if sheet_writer:
12 sheet_writer.write_array(incoming_dict[sheet_name])
13 sheet_writer.close()
14 else:
15 raise Exception("Cannot create a sheet writer!")