Blazor Spreadsheet Example - Number Formatting
| 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 |
|---|
| 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 |
| Customer Name | Cristi Espinos | Waiter Name | Raye Whines | ||||||||||||||||||||||||||||||||||||
| Table No. | 8 | Date | 5/7/2019 | ||||||||||||||||||||||||||||||||||||
| Item Code | Item Name | 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 | ||||||||||||||||||||||||||||||||||||||
This sample demonstrates the number formatting capabilities of Spreadsheet using financial data. It highlights how you can display values consistently using formats for currency, percentage, dates, and decimal precision, making it easier to interpret and compare numerical information.
The Blazor Spreadsheet number formatting feature enables you to format cells with predefined styles for different data types. To enable number formatting, set the AllowNumberFormatting property to true.
Applying Number Formats:
- Currency - Displays monetary values with currency symbols and decimal precision (e.g., $1,234.56).
- Percentage - Shows ratios and proportions as percentages (e.g., 75%).
- Date and Time - Formats dates and times in human readable formats (e.g., 25-Nov-2025, 12:30 PM).
- Number - Displays numeric values in a standard number format.
- Accounting - Currency format aligned for financial statements where symbols and decimals line up for better readability(e.g., $ 67.5).
- Scientific - Scientific notation format (e.g., 1.23E+03) for displaying very large or very small numbers compactly.
In this demo, you can apply various number formats to the financial dataset to enhance data presentation. Select cells and choose formats from the Number Format dropdown in the ribbon to ensure consistent and clear data representation.
For more detailed information about number formatting, refer to the number formatting documentation.