I have to count the spaces within in NumberFormat of each cell in column A. Here is an example NumberFormat:
" "@
I translated my VBA code into OfficeScripts ExcelScript (for Excel for Web) but it seems that the replace function doesn't removes the spaces:
sheet.getRange("A1").getNumberFormat().length - sheet.getRange("A1").getNumberFormat().replace(" ", "").length
Is there another option to count the spaces or did I something wrong with the replace function (other letters will be replaced correctly)