Grids
Example of Number Formatting in ASP.NET Core Spreadsheet Control
This sample demonstrates number formatting feature with a restaurant invoice.
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | AD | AE | AF | AG | AH | AI | AJ | AK | AL | AM | AN | AO | AP | AQ | AR | AS | AT | AU | AV | AW | AX | AY |
---|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
Customer Name | Cristi Espinos | Waiter Name | Raye Whines | |||||||||||||||||||||||||||||||||||||||||||||||
Table No. | 8 | Date | 5/7/2019 | |||||||||||||||||||||||||||||||||||||||||||||||
ItemCode | ItemName | Quantity | Rate | Amount | ||||||||||||||||||||||||||||||||||||||||||||||
I231 | Chinese Combo Noodle | 2 | $125.00 | $250.00 | ||||||||||||||||||||||||||||||||||||||||||||||
I245 | Chinese Combo Rice | 3 | $125.00 | $375.00 | ||||||||||||||||||||||||||||||||||||||||||||||
I237 | Amritsari Chola | 2 | $225.00 | $450.00 | ||||||||||||||||||||||||||||||||||||||||||||||
I291 | Asian Mixed Entree Platt | 3 | $165.00 | $495.00 | ||||||||||||||||||||||||||||||||||||||||||||||
I268 | Chinese Combo Chicken | 3 | $125.00 | $375.00 | ||||||||||||||||||||||||||||||||||||||||||||||
I251 | Chivas Regal | 1 | $325.00 | $325.00 | ||||||||||||||||||||||||||||||||||||||||||||||
I256 | Chicken Drumsticks | 2 | $180.00 | $360.00 | ||||||||||||||||||||||||||||||||||||||||||||||
I232 | Manchow Soup | 2 | $160.00 | $320.00 | ||||||||||||||||||||||||||||||||||||||||||||||
I290 | Schezuan Chicken | 3 | $180.00 | $540.00 | ||||||||||||||||||||||||||||||||||||||||||||||
I229 | Manchow Soup | 2 | $125.00 | $250.00 | ||||||||||||||||||||||||||||||||||||||||||||||
I239 | Jw Black Lable | 2 | $175.00 | $350.00 | ||||||||||||||||||||||||||||||||||||||||||||||
Subtotal: | $4,090.00 | |||||||||||||||||||||||||||||||||||||||||||||||||
Discount (8%): | $327.20 | |||||||||||||||||||||||||||||||||||||||||||||||||
Total Amount: | $3,762.80 | |||||||||||||||||||||||||||||||||||||||||||||||||
In this demo, number formatting is applied to specific cells by using the format
property,
and a range of cells by using the numberFormat
method.
In the Amount column, we have used Custom number formatting to highlight the values less than 350 and greater than 350 with red and blue colors respectively.
More information about number formatting can be found in this documentation section.