Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom function ID naming requirements are unclear #4039

Open
parched opened this issue Jun 1, 2023 · 4 comments
Open

Custom function ID naming requirements are unclear #4039

parched opened this issue Jun 1, 2023 · 4 comments
Assignees
Labels
Area: custom functions Status: under investigation Issue is being investigated Type: doc request Request for new documentation or updates/enhancements to existing documentation

Comments

@parched
Copy link

parched commented Jun 1, 2023

This page says

use characters A through Z, numbers zero through nine, underscores, and periods.

On https://learn.microsoft.com/en-us/office/dev/add-ins/excel/custom-functions-json it says

contains only alphanumeric characters and periods
... unique within the scope of the file. That is, no two function objects in the metadata file should have the same id value

  • Are lowercase letters allowed?
  • If so, are these distinct? "MYFUNC" vs "myfunc"
  • I noticed in the sheetx.xml the periods are converted to underscores. Does that mean "MY.FUNC" is not distinct from "MY_FUNC"?

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@ghost ghost added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Jun 1, 2023
@Rick-Kirkham Rick-Kirkham added Needs: attention 👋 Waiting on Microsoft to provide feedback Area: custom functions and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Jun 1, 2023
@Rick-Kirkham
Copy link
Contributor

@alison-mk Please take a look and see if the instructions need clarification.

@parched
Copy link
Author

parched commented Jun 1, 2023

I've raised a script lab issue too OfficeDev/script-lab#1009.

I would prefer it if this were actually considered an Excel bug and fixed. I'm wanting to use period as a namespace separator in my custom function and have been assuming that IDs can't conflict with different ones in the parent namespace.

@parched
Copy link
Author

parched commented Jun 1, 2023

Note, using underscore and period works fine in a LAMBDA function.
image

@alison-mk
Copy link
Contributor

Hi @parched, thanks for submitting this question.

I've tested the ID naming requirements and my results are as follows.

Question: Are lowercase letters allowed as custom function ID values?
Answer: Yes, but they will be automatically converted to uppercase letters in the JSON output.

Question: Are lowercase letters distinct from uppercase letters as custom function ID values?
Answer: No. Custom function ID values are not case-sensitive. For example, “A” is the same as “a”.

Question: Are periods (.) distinct from underscores (_) in custom function ID values?
Answer: Yes.

I'm confirming these answers internally. I'll report back when I've updated the documentation, or if I have additional information.

Cheers,
Alison

@alison-mk alison-mk added Type: doc request Request for new documentation or updates/enhancements to existing documentation Status: under investigation Issue is being investigated and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: custom functions Status: under investigation Issue is being investigated Type: doc request Request for new documentation or updates/enhancements to existing documentation
Projects
None yet
Development

No branches or pull requests

3 participants