-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathConditionalFormattingSamples.cs
More file actions
57 lines (42 loc) · 1.79 KB
/
ConditionalFormattingSamples.cs
File metadata and controls
57 lines (42 loc) · 1.79 KB
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
56
57
using EPPlusSamples.ConditionalFormatting;
using OfficeOpenXml;
using System;
using System.IO;
namespace EPPlusSamples
{
internal class ConditionalFormattingSamples
{
public static void Run()
{
Console.WriteLine("Running sample 3.2");
FileInfo newFile = FileUtil.GetCleanFileInfo("3.2-ConditionalFormattings.xlsx");
using (ExcelPackage pck = new ExcelPackage(newFile))
{
//Styling in ConditionalFormatting
StylingExample.Run(pck);
//Averages in ConditionalFormatting
//And basic properties for them
AveragesExample.Run(pck);
//Standard deviations and top bottom values/percentages
StandardDeviationTopDown.Run(pck);
//Last7Days, yesterday,tommorow, last week/month etc.
DatesAndTime.Run(pck);
//Format if there are blanks, errors or noBlanks noErrors and duplicate values
BlanksErrorsAndDuplicates.Run(pck);
//Formattings that check for text. Cell ends starts and contain given string
StartsEndContainsExample.Run(pck);
//Format if equal or between values and custom expressions
EqualBetweenExpressionsExamples.Run(pck);
RemovalAndCasting.Run(pck);
//Advanced CFs below
//Iconsets rules including custom iconsets
IconsetsExample.Run(pck);
//Databars with full features
DatabarsExample.Run(pck);
//Two and Three colorscales can use theme, index and auto-color same as databar
ColorScaleExample.Run(pck);
pck.SaveAs(newFile);
}
}
}
}