I am trying to do the following:
Code: Select all
# Get the current document
context = uno.getComponentContext()
desktop = context.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop", context)
document = desktop.getCurrentComponent()
# Get the sheet
sheet = document.getSheets().getByName("CG_CHR")
# Args for saving
args = toProperties({"ReadOnly":False})
# Save
sheet.storeToURL("file://"+tmpSpreadsheet, args)
What is the correct way to do this?
Thanks!