Use the dataformatstring attribute to provide the custom formats of items in the column
Source: Internet
Author: User
Use the dataformatstring attribute to provide the custom formats of items in the column.
A data format string consists of two parts separated by a colon, in the form of {A: bxx }. For example, the formatted string {0: F2} displays the number of fixed points with two decimal places.
Note that the entire string must be placed in braces, indicating that it is a format string, not the actual string. Any text outside the braces is displayed as the actual text.
The value before the colon (A in the general example) specifies the parameter index in the parameter list starting from scratch.
Note that this value can only be set to 0, because each cell has only one value.
The character after the colon (B in general) specifies the display format of the value. The following table lists some common formats.
Format Character Description
C. The value is displayed in currency format.
D. The value is displayed in decimal format.
E. The value is displayed in the scientific notation (exponent) format.
F displays the value in a fixed format.
G displays the value in the regular format.
N is a numeric value.
X indicates the value in hexadecimal format.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.