title: Trim without turning some numerical values into date values Google script
body: <p>I have</p>
  
  <pre><code>var rangeValues = sheet.getDataRange().getValues();
  // iterate through all cells in the selected range
  for (var cellRow = 0; cellRow &lt; maxHeight; cellRow++) {
   for (var cellColumn = 0; cellColumn &lt; maxWidth; cellColumn++) {  
      rangeValues[cellRow][cellColumn] = rangeValues[cellRow][cellColumn].toString().trim();
   }
  }
  </code></pre>
  
  <p>and it turns some numerical values into date values</p>
  
  <p>Ex:</p>
  
  <p>8055-1 >> <code>Fri Jan 01 8055 00:00:00 GMT-0600 (CST)</code></p>
  
  <p>I think the issue is <code>toString()</code> not <code>trim()</code></p>
  
  <p>Is there a way to trim to avoid this problem?</p>
  
  <p>Thanks</p>