Skip to content

Commit

Permalink
🎨 Use excel dialect in csv export (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
hf-krechan authored Mar 13, 2024
1 parent 881e9cc commit 96a04dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/migmose/mig/nachrichtenstrukturtabelle.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def to_csv(self, message_type: EdifactFormat, output_dir: Path) -> None:
file_path = output_dir.joinpath(f"{message_type}_nachrichtenstruktur.csv")
fieldnames = list(NachrichtenstrukturZeile.model_fields.keys())
with open(file_path, "w", encoding="utf-8") as csv_file:
writer = csv.DictWriter(csv_file, fieldnames=fieldnames)
writer = csv.DictWriter(csv_file, fieldnames=fieldnames, dialect="excel")
writer.writeheader()
for nachrichtenstruktur_zeile in self.lines:
writer.writerow(nachrichtenstruktur_zeile.model_dump())
Expand Down

0 comments on commit 96a04dc

Please sign in to comment.