openpyxl
openpyxl copied to clipboard
[Issue] normal fomula is change to array formula
Problem
When using Openpyxl to overwrite the new Excel sheet in the existing Excel sheet, the existing normal formula is changed to an array formula and stored.
for example, it is dynamic formula
=FILTER(INDIRECT($B$22&"!"&"$B:$AY"),INDIRECT($B$22&"!"&"$C:$C")=B24)
to
{=FILTER(INDIRECT($B$22&"!"&"$B:$AY"),INDIRECT($B$22&"!"&"$C:$C")=B24)}
I want use normal formula. why normal formula is changed to array formula?
here is my code
def add_new_sheet_to_excel_file(self, file_path, file_name, sheet_name, file):
with self.pandas.ExcelWriter(f"{file_path}/{file_name}", mode='a', engine='xlsxwriter', if_sheet_exists='overlay') as writer:
file.to_excel(writer,sheet_name=sheet_name)
Please, check this issue.