๐range.setNumberFormat()
ๆญคๆไปคไธป่ฆๆฏ็จไพ่จญๅฎใๅฒๅญๆ ผๅผ็ๆ ผๅผใ(ๆธๅญใๆๅญใๆฅๆ็ญ)๏ผไฝๆไปคๅ็จฑๅๅพๅฏฆๅจๅพ็ณ็ณใ
// text
range.setNumberFormat("@");
// date format
range.setNumberFormat("M/d/yy");
// Money format
range.setNumberFormat("$#,##0.00;$(#,##0.00)");
Date and Number Formats โญ๏ธโญ๏ธ
common syntax characters for custom number format:
0
A digit in the number. An insignificant 0 will appear in the results.
#
A digit in the number. An insignificant 0 will not appear in the results.
?
A digit in the number. An insignificant 0 will appear as a space in the results.
$
Formats numbers as a dollar value.
.(period)
Formats numbers with a decimal point.
,(comma)
Formats numbers with a thousands separator.
/
Formats numbers as a fraction.
%
Formats numbers as a percent
E
Formats numbers as an exponent.
"text"
Adds text to the formula. Insert the desired text within quotations for it to appear.
@
Displays text entered into a cell.
*
Repeats the following character to fill in the remaining space in the cell.
_ (underscore)
Adds a space equal in width to the following character.
Set cell format with google apps script โญ๏ธโญ๏ธโญ๏ธ
Chris Black โฉ Cell Number Formatting with Google Apps Script โญ๏ธ
ConditionalFormatRule - ่จญๅฎๆขไปถๆ ผๅผใ
Last updated
Was this helpful?