Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-06

fpspreadsheet: custom property in xslooxml writer

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luca Olivetti

Hello,

I need to generate an xslx file with a custom property. It's a matter of adding to the zip the file docProps/custom.xml (I see that libreoffice adds more files in that directory but for my purposes custom.xml is enough). The only way I found is to override the WriteToStream methos of TSSpreadOOXMLWriter: copy it verbatim and add my new stream in the new implementation.
It works fine, but I wonder if is there a better way. Maybe the writer could add some hooks to insert custom files in the xslx document?
BTW, I also thought of overriding the WriteMedia method (since it exposes the TZipper as a parameter) but unfortunately it's not virtual so it cannot be overridden.

Bye

Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007

Reply by email