First, thank you all for your prompt replies. They have been very useful.
Regarding the OOo forum (to which @Villeroy linked), it has been at least several months (if not more) that I could successfully reach sites dependent or related to AOO (forum, wiki…). I was not able to connect this time either (time out). I used the wayback machine. I have no idea whether the info I could gather is up-to-date enough. Not being a developer myself, that info was a little bit overwhelming to me, at least for my current purpose.
@Villeroy’s “Cell_FormatCode.ods” file was more useful, as I could focus on the goal I want to achieve.
@Villeroy, would the “CELL_FORMATCODE” function work if I only leave the “CELL_FORMATCODE” snippet code? Does the specific “CELL_FORMATCODE” code depend on some other part of the whole “modCELL” module? If I delete the other parts of “modCELL”, would / should the “CELL_FORMATCODE” function work exactly the same? Is it independent of the other parts?
@Lupp,
I don’t know if you were really asking, but… IIUC: “If I Understand Correctly”.
As for studying the “disask_134290_getNumberFormatString.ods” file…
_ Questions about the “numberFormatString” UDF:
It says it requires VBA support, but you don’t recommend using it. Since I am not a developer, I have no idea about potential problems and limitations, nor about potential advantages of using this one over the others, so I guess I should not choose this alternative considering that there are other ones(?).
I should anyway mention that the code says:
Will return ":fail: if pRef doesn’t reference a single cell
or a range consisting of exactly one cell.
… but cell D4 actually complies with those conditions, and yet it returns a valid result.
_ Questions about the “numberFormatString2” UDF:
_ In cell D13, would you please explain the (original / real) intention of the second part of the concatenation? It seems some unintentional remnant or typo of some kind, but I don’t really know.
From the point of view of the user, @Lupp’s “numberFormatString2” has the same syntax as @Villeroy’s “Cell_FormatCode”; on the other hand, the LO BASIC code is slightly different, so… Is there a chance that a combination of @Villeroy’s “Cell_FormatCode” mixed with @Lupp’s “numberFormatString2” could result in an improved LO BASIC code? Any suggestions?
@schiavinatto, I am yet to test that code. If I understand correctly, I would have to come up with some way to use cell’s addresses as strings between double quotation marks (e.g. the ADDRESS() function) as argument for that code / function, or alternatively, manually type-in each cell address. Not being a developer myself, at this time it seems easier for me to start with the alternatives already provided as ods files, but my lack of experience on these matters could very easily fool me.