Apache OpenOffice (AOO) Bugzilla – Issue 109140
Adding named range with operators (':', '+', ...) in name is possible using the API
Last modified: 2017-05-20 11:11:34 UTC
it's possible to insert a named range containing a ":" using api but it's not possible to add/change it via Insert - Names - Define... it was possible in oo 1.1.5 ... REM ***** BASIC ***** OPTION EXPLICIT Sub Main Dim oDoc as Object Dim oNRanges as Object Dim sN as String Dim sC as String Dim oDummy as New com.sun.star.table.CellAddress Dim l as Long oDoc = ThisComponent oNRanges = oDoc.NamedRanges sN = "TIMESTAMP_10.02.2010_09:00:00" sC = "$'" & oDoc.getSheets().getByIndex(0).getName() & "'." & "$A$1" oNRanges.AddNewbyName(sN, sC, oDummy, l) End Sub
Actually it is an error that adding such a name using the API is still allowed.. The colon is the range operator, the name couldn't be used in formulas.
> Actually it is an error that adding such a name using the API is still allowed.. please be aware that disallowing this (via api) could lead to compatibilty problems. furthermore opening document containing such chars could be problematic in future too, for example if range names would be checked during load ...
What is a name good for that can't be used anywhere? OOo may support single quoted name identifiers in future, but please also note that when exporting to other file formats or being read by other applications the name may get lost or converted.
Reset assigne to the default "issues@openoffice.apache.org".