I am trying to run a command line program to export sheets (four in total) from a LibreOffice ODS spreadsheet file in CSV format.
I work with what is basically PyODConverter.py at https://github.com/mirkonasato/pyodconverter .
The problem I am facing is to save / all / four sheets in a file (the current approach is to save them in a separate file for each sheet).
Disclaimer: I donβt feel overly confident in Python programming (yet). Anyway, in the above python script, at the end of the conversion function, I added the following:
try:
oSheets = document.Sheets
for i in range (oSheets.Count):
sheet = oSheets.getByIndex (i)
document.CurrentController.setActiveSheet (sheet)
outputUrl = self._toFileUrl (sheet.Name + ".csv")
print sheet.Name + "" + outputUrl
document.storeToURL (outputUrl, self._toProperties (storeProperties))
finally:
document.close (True)
, , . , "" ( ), . , CSV.
, , .
( : LibreOffice, , script , , ).
.