Beispiel #1
0
 public static AbstractRange ToHeading3(this AbstractRange range)
 {
     return(range.ToColorBackground(Heading3Background)
            .ToColorForeground(Heading3Foreground)
            .ToFontSize(Heading3FontSize)
            .ToItalic());
 }
Beispiel #2
0
 public static AbstractRange ToHeading2(this AbstractRange range)
 {
     return(range.ToColorBackground(Heading2Background)
            .ToColorForeground(Heading2Foreground)
            .ToFontSize(Heading2FontSize)
            .ToBold());
 }
Beispiel #3
0
 public static AbstractRange SetValue(this AbstractRange range, decimal value, bool emptyIfZero)
 {
     if (value != 0 || !emptyIfZero)
     {
         range.Value = value;
     }
     return(range);
 }
Beispiel #4
0
 public static AbstractRange SetValue(this AbstractRange range, DateTime?date)
 {
     if (date.HasValue)
     {
         range.Value = date.Value.ToShortDateString();
     }
     return(range);
 }
Beispiel #5
0
 public static AbstractRange SetBorders(this AbstractRange range, MultipleBorders borders, LineStyle lineStyle,
                                        SpreadsheetColor borderColor = default(SpreadsheetColor))
 {
     range.Style.SetBorders(borders, lineStyle, borderColor);
     return(range);
 }
Beispiel #6
0
 public static AbstractRange SetFormula(this AbstractRange range, string formula)
 {
     range.Formula = formula;
     return(range);
 }
Beispiel #7
0
 public static AbstractRange SetHyperlink(this AbstractRange range, string locationUrl, bool isExternal = true)
 {
     range.Hyperlink.Location   = locationUrl;
     range.Hyperlink.IsExternal = isExternal;
     return(range);
 }
Beispiel #8
0
 public static AbstractRange ToDate(this AbstractRange range)
 {
     range.Style.ToDate();
     return(range);
 }
Beispiel #9
0
 public static AbstractRange SetValue(this AbstractRange range, string value, int indentLevel = 0)
 {
     range.Value = string.Format("{0}{1}",
                                 new string(Convert.ToChar(" "), 3 * indentLevel), value);
     return(range);
 }
Beispiel #10
0
 public static AbstractRange ToCurrency(this AbstractRange range, bool includeSymbol = true, bool includeChange = true)
 {
     range.Style.ToCurrency(includeSymbol, includeChange);
     return(range);
 }
Beispiel #11
0
 public static AbstractRange ToPercent(this AbstractRange range)
 {
     range.Style.ToPercent();
     return(range);
 }
Beispiel #12
0
 public static AbstractRange To2Digits(this AbstractRange range)
 {
     range.Style.To2Digits();
     return(range);
 }
Beispiel #13
0
 public static AbstractRange ToColorBackground(this AbstractRange range, SpreadsheetColor color)
 {
     range.Style.ToColorBackground(color);
     return(range);
 }
Beispiel #14
0
 public static AbstractRange ToFontSize(this AbstractRange range, int fontSize)
 {
     range.Style.ToFontSize(fontSize);
     return(range);
 }
Beispiel #15
0
 public static AbstractRange ToUnderline(this AbstractRange range, UnderlineStyle underlineStyle = UnderlineStyle.Single)
 {
     range.Style.ToUnderline(underlineStyle);
     return(range);
 }
Beispiel #16
0
 public static AbstractRange ToItalic(this AbstractRange range)
 {
     range.Style.ToItalic();
     return(range);
 }