";" character being replaced with "|" character when writing one formula
When I write one formula containing ";", on excel file it is replaced by "|".
For example, if formula was "=SUM(A3;A2)", on excel I would find "=SUM(A3|A2)"
I tried other formulas using colon symbol ":" and they worked fine.
I am using this stack:
- Windows O.S.: 20H2 (build 19042.985)
- Python: 3.8.3
- openpyxl: 3.0.5
The minimum reproducible example I did create is this:
from openpyxl import Workbook import os class ExcelFile: '''Defines methods to generate automation list.''' def __init__(self, wb_path: str): self.wb_path = wb_path self.wb = Workbook() def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): self._save() def populate_wb(self): '''Sets document title and first row.''' self.automation_list_ws = self.wb.create_sheet('AutomationList') self.automation_list_ws['A1'] = '=SUM(A3;A2)' def _save(self): self.wb.save(filename=self.wb_path) out_filepath = os.path.join('C:\\', 'Users', os.getlogin(), 'Documents', 'out', 'file.xlsx') with ExcelFile(out_filepath) as excel_file: excel_file.populate_wb()
How can I fix this?