Niklas Nebel wrote:
On 04/19/09 23:17, Jan Holst Jensen wrote:
Did I miss something while creating the add-in or is this an actual
bug in OOo Calc import/export filters ? I badly need this or my
end-users won't be able to exchange sheets across OOo and Excel.
If you want to save to XLS, your add-in has to provide proper
compatibility names for the functions.
Ahhh!!! Thanks Niklas! So THAT's what that CompatibilityName thingie was
for! Now I can actually write XLS files and read them back in without
getting nonsense. I am generating a CalcAddIn.xcu file via Python code,
and added the line "++" line below to make it work (code called to
generate metadata for each function).
xml_file.write(' <node oor:name="' + function_name + '"
oor:op="replace">\n')
xml_file.write(' <prop oor:name="DisplayName"><value
xml:lang="en">' + function_name + '</value></prop>\n')
xml_file.write(' <prop oor:name="Description"><value
xml:lang="en">' + description + '</value></prop>\n')
xml_file.write(' <prop
oor:name="Category"><value>Add-In</value></prop>\n')
++ xml_file.write(' <prop oor:name="CompatibilityName"><value
xml:lang="en">' + function_name + '</value></prop>\n')
xml_file.write(' <node oor:name="Parameters">\n')
OK, so my users won't lose data now if they save in XLS. Major
improvement to say the least :-). Will do for a first release.
However, I still don't know how to make my OOo add-in map correctly to
the corresponding add-in that I made in Excel 2007. I have created an
Excel add-in called DoobieExample.xlam that implements the infamous
DoobieDoo functions.
Problem is, that I haven't succeeded in making OOo understand the .XLSX
files from XL2007, nor in getting XL2007 to read in an .XLS file
produced by OOo. OOo will complain that the files from XL2007 contain
external links that it cannot refresh, and XL2007 just won't understand
the function name (results in #NAME though it is shown correctly in the
formula bar, but I need to edit it manually and press Enter to resolve
the function correctly).
I tried using
<prop oor:name="CompatibilityName"><value
xml:lang="en">DoobieExample.xlam!' + function_name + '</value></prop>
but still no go either way. Do working examples exist - that is,
extensions that are available both for Excel and OOo Calc ?
Kind regards
-- Jan Holst Jensen
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]