I occasionally encounter the “invalid parameter” error when saving as .ods Calc file.
Note:
This is albeit the same set of instructions did not previously show the “invalid parameter” error.
LibreOffice Version: 6.3.5.2 (x86)
Operating System: Windows 7 Ultimate Service Pack 1
Dim Prop(1) as New com.sun.star.beans.PropertyValue
Dim saveAsODSArgs(1) as new com.sun.star.beans.PropertyValue
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
sOutputPath = DirectoryNameoutofPath(ThisComponent.getURL(),"/")
sOutputFileName = "WeeklyCollectionReportWorkbook.ods"
saveAsODSArgs(0).Name = "URL"
saveAsODSArgs(0).Value = sOutputPath & "/" & sOutputFileName
saveAsODSArgs(1).Name = "FilterName"
saveAsODSArgs(1).Value = "writer8"
dispatcher.executeDispatch(ThisComponent.CurrentController.Frame, ".uno:SaveAs", "", 0, saveAsODSArgs())
Present Solution
To solve the “invalid parameter” error, I restart LibreOffice Calc.
If the problem persists, I restart the Operating System.
Question:
What is the best technique to solve this problem?
Thank you. Peace.