Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88111

Custom function in Google Script doesn't work when downloaded as Microsoft Excel

$
0
0

I am very new to JS. I wrote a simple function in Google Script. It worked well in Google Sheets. But, give an error when the sheet is downloaded as Microsoft Excel. My function if as below.

function test(input){
  var str = "";
  for(i=0; i<input.length; i++){
    for(j=0; j<input[i].length; j++){
      var char0 = input[i][j].charAt(0).toUpperCase();
      var sub = input[i][j].substr(1,input[i][j].length);
      str = str.concat(char0,sub,",");               
    }
  }
  return str;
}

Viewing all articles
Browse latest Browse all 88111

Trending Articles