f9e4b6ddb0ba1d85ed00b05fb51812c6ff5d8dd8
FAQ/Questions/Add-Formatting-Options.md
| ... | ... | @@ -10,7 +10,9 @@ Here we will show you how to easily add a new formatting option to the "Formats" |
| 10 | 10 | |
| 11 | 11 | Excel uses internal formatting and attempts to 'guess' what the proper format for a value should be. This means that sometimes, Excel guesses incorrectly and while the correct value might be exported to Excel, the format will be wrong - for example, .623 instead of 62.3%. In this case, it is necessary to specify the data type group exactly using the full constructor to specify data type: |
| 12 | 12 | |
| 13 | -`AdHocSettings.Formats.Add("{0:P2}", new SimpleFormat("Percent", "{0:P2}", new SqlTypeGroup[] { SqlTypeGroup.Numeric, SqlTypeGroup.Money, SqlTypeGroup.Real }));` |
|
| 13 | +```csharp |
|
| 14 | + AdHocSettings.Formats.Add("{0:P2}", new SimpleFormat("Percent", "{0:P2}", new SqlTypeGroup[] { SqlTypeGroup.Numeric, SqlTypeGroup.Money, SqlTypeGroup.Real })); |
|
| 15 | +``` |
|
| 14 | 16 | |
| 15 | 17 | ##Example 1 - Bold |
| 16 | 18 |