How to save document in flat ODS (FODS) format?

2 replies [Last post]
drkwv
Offline
Last seen: 8 weeks 6 days ago
Title:
Joined: 30 Sep 2015
Posts: 2
Hello. I’m using this macro function to save document as ODS:

Function SaveDocAsODS(ByVal FilePath As String)

    Dim SaveParams( 1 ) As New com.sun.star.beans.PropertyValue
    SaveParams( 0 ).Name = "Overwrite"
    SaveParams( 0 ).Value = TRUE
    SaveParams( 1 ).Name = "FilterName"
    SaveParams( 1 ).Value = "calc8"
    ThisComponent.storeAsURL(ConvertToURL(FilePath),SaveParams())

End Function

How to save document in the FODS format?

oweng
oweng's picture
Offline
Last seen: 5 days 10 hours ago
Title: ==Moderator==
Joined: 26 Jan 2012
Posts: 3281
filter
The related filter is here: https://cgit.freedesktop.org/cgit/?url=libreoffice/core/tree/filter/sour...

Instead of “calc8” try using “calc_ODS_FlatXML”.

drkwv
Offline
Last seen: 8 weeks 6 days ago
Title:
Joined: 30 Sep 2015
Posts: 2
“calc_ODS_FlatXML” and “Flat
“calc_ODS_FlatXML” and “Flat XML ODF Spreadsheet” gave me an error:

BASIC runtime error.
An exception occurred 
Type: com.sun.star.task.ErrorCodeIOException
Message: SfxBaseModel::impl_store <file:///C:/Users/Username/Desktop/filename.fods> failed: 0x81a.

But the node oor:name attribute value “OpenDocument Spreadsheet Flat XML” has worked and the document was saved in FODS format. Thank you for help.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.