Aug 02 2021 01:45 PM - edited Aug 02 2021 01:46 PM
Hello,
When we develop Excel add-ins by JavaScript API, we need to determine the argument separator of Excel formulas. For some environments it is `,` (comma); for some environments it is `;` (semicolon). I don't know if there are other possibilities.
It seems that there is no an Excel JavaScript API to get that directly, please correct me if I'm wrong.
Another possibility is to get the language of the user. But where can we find a match table of language and the argument separator?
Does anyone have a reliable way to get this information?
Aug 02 2021 01:53 PM
SolutionYou might get the decimal separator:
const systemDecimalSeparator = context.application.cultureInfo.numberFormat.numberDecimalSeparator;
If it is a point, the list (argument) separator will be comma; if it is a comma, the list separator will be semi-colon.
Aug 02 2021 02:08 PM
"If it is a point, the list (argument) separator will be comma; if it is a comma, the list separator will be semi-colon." ==> are you really sure that it is always the case?
Aug 02 2021 02:10 PM
I've never seen an exception.
Aug 02 2021 01:53 PM
SolutionYou might get the decimal separator:
const systemDecimalSeparator = context.application.cultureInfo.numberFormat.numberDecimalSeparator;
If it is a point, the list (argument) separator will be comma; if it is a comma, the list separator will be semi-colon.