eea / odfpy

API for OpenDocument in Python
GNU General Public License v2.0
311 stars 64 forks source link

Write functions #133

Open oliviercailloux opened 9 months ago

oliviercailloux commented 9 months ago

The following code shows the string "=1 + 1" in the ODS file (after opening with LibreOffice Calc), whereas it correctly shows 2 in the XLSX file (after opening with the same version of LibreOffice Calc).

import pandas as pd

pd.Series(["=1 + 1"]).to_excel("test.xlsx")
pd.Series(["=1 + 1"]).to_excel("test.ods")

Perhaps it makes sense to consider that the python string "=1 + 1" should be written to the spreadsheet as a string (that is, as-is) instead of as a function call, but then this should happen in xlsx as well. And user should be given some way of writing a function call.

Otherwise, please make the function call work in ODS as well!