Пример #1
0
 public static AbstractRange ToHeading3(this AbstractRange range)
 {
     return(range.ToColorBackground(Heading3Background)
            .ToColorForeground(Heading3Foreground)
            .ToFontSize(Heading3FontSize)
            .ToItalic());
 }
Пример #2
0
 public static AbstractRange ToHeading2(this AbstractRange range)
 {
     return(range.ToColorBackground(Heading2Background)
            .ToColorForeground(Heading2Foreground)
            .ToFontSize(Heading2FontSize)
            .ToBold());
 }
Пример #3
0
 public static AbstractRange SetValue(this AbstractRange range, decimal value, bool emptyIfZero)
 {
     if (value != 0 || !emptyIfZero)
     {
         range.Value = value;
     }
     return(range);
 }
Пример #4
0
 public static AbstractRange SetValue(this AbstractRange range, DateTime?date)
 {
     if (date.HasValue)
     {
         range.Value = date.Value.ToShortDateString();
     }
     return(range);
 }
Пример #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);
 }
Пример #6
0
 public static AbstractRange SetFormula(this AbstractRange range, string formula)
 {
     range.Formula = formula;
     return(range);
 }
Пример #7
0
 public static AbstractRange SetHyperlink(this AbstractRange range, string locationUrl, bool isExternal = true)
 {
     range.Hyperlink.Location   = locationUrl;
     range.Hyperlink.IsExternal = isExternal;
     return(range);
 }
Пример #8
0
 public static AbstractRange ToDate(this AbstractRange range)
 {
     range.Style.ToDate();
     return(range);
 }
Пример #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);
 }
Пример #10
0
 public static AbstractRange ToCurrency(this AbstractRange range, bool includeSymbol = true, bool includeChange = true)
 {
     range.Style.ToCurrency(includeSymbol, includeChange);
     return(range);
 }
Пример #11
0
 public static AbstractRange ToPercent(this AbstractRange range)
 {
     range.Style.ToPercent();
     return(range);
 }
Пример #12
0
 public static AbstractRange To2Digits(this AbstractRange range)
 {
     range.Style.To2Digits();
     return(range);
 }
Пример #13
0
 public static AbstractRange ToColorBackground(this AbstractRange range, SpreadsheetColor color)
 {
     range.Style.ToColorBackground(color);
     return(range);
 }
Пример #14
0
 public static AbstractRange ToFontSize(this AbstractRange range, int fontSize)
 {
     range.Style.ToFontSize(fontSize);
     return(range);
 }
Пример #15
0
 public static AbstractRange ToUnderline(this AbstractRange range, UnderlineStyle underlineStyle = UnderlineStyle.Single)
 {
     range.Style.ToUnderline(underlineStyle);
     return(range);
 }
Пример #16
0
 public static AbstractRange ToItalic(this AbstractRange range)
 {
     range.Style.ToItalic();
     return(range);
 }