How to use a comma as a decimal seperator in Oracle Apex?

We use commas as our decimal seperator in my company and I am trying to incorporate this in our apex form but it’s automatically rounding the numbers up or own to a whole number when an excel is imported with that number column. I realize that a way around this is to set the column as a text field but then the issue is because these decimals are used in mathemetical functions which then don’t work it’s text and not a number.

What I’m thinking is maybe a convertion from text to decimal with a “dot” as a seperator, ergo 4,2 –> 4.2 and then use that temporary variable in our function.

Example:

var num1 = document.getElementById('P19_MENGE_1').value;
var num2Text = document.getElementById('P19_KI').value; // Get the text value
var num3 = document.getElementById('P19_PF').value;

// Replace commas with periods in num2
var num2 = parseFloat(num2Text.replace(",", ".")); // Convert to a number with the decimal point

// Convert text inputs to numbers with error handling
function toNumber(value) {
    const parsedValue = parseFloat(value);
    if (isNaN(parsedValue)) {
        console.error(`Invalid number: ${value}`);
        return 0;
    }
    return parsedValue;
}

num1 = toNumber(num1);
num2 = toNumber(num2);
num3 = toNumber(num3);

if (num1 === 0 || num2 === 0 || num3 === 0) {
    document.getElementById('P19_ANZ_PAL').value = "";
} else {
    const result = num1 / num2 / num3;
    document.getElementById('P19_ANZ_PAL').value = result.toFixed(1);
}

what happens right now is the decimal gets removed when I click on save so 42,5 goes to 425 and the result is calculated with that 425…