It is possible to set number format to a cell with google apps script like
cell.setNumberFormat("0.000");
I need to set cell format to a text, so that any date-like values were not automatically converted.
How can I do this?
It is possible to set number format to a cell with google apps script like
cell.setNumberFormat("0.000");
I need to set cell format to a text, so that any date-like values were not automatically converted.
How can I do this?
The setNumberFormat function in the Google Apps Script is not well documented. This function accepts a wide range of parameters in a single string that can be used to specify the format for a range of cells.
So here is the different example on how to set the setNumberFormat function.
As plain text for a single cell:
As date for single column:
As currency for entire sheet:
Source: Cell Number Formatting with Google Apps Script