Allow override of header row for CSV exporters

This commit is contained in:
Lance Edgar 2020-08-19 18:11:27 -05:00
parent 06afadbe2a
commit 6444e64eb3

View file

@ -172,6 +172,9 @@ class ToCSV(ToFile):
else: # PY3 else: # PY3
self.output_file = open(self.output_file_path, 'wt', encoding='utf_8') self.output_file = open(self.output_file_path, 'wt', encoding='utf_8')
self.output_writer = csv.DictWriter(self.output_file, self.fields) self.output_writer = csv.DictWriter(self.output_file, self.fields)
self.write_output_header()
def write_output_header(self):
self.output_writer.writeheader() self.output_writer.writeheader()
def close_output_file(self): def close_output_file(self):