Exemple #1
0
 public ExcelValueObject(string text, ExcelCellFormat format, string customStyle)
 {
     Text = text;
     Format = format;
     Style = ExcelCellStyle.Custom;
     CustomStyle = customStyle;
 }
        /// <summary>
        /// Returns excel number format attribute for given excelcellformat value.
        /// </summary>
        /// <param name="excelCellFormat">Excel cell format value.</param>
        /// <returns>Excel number format attribute.</returns>
        public static ExcelNumberFormatAttribute GetExcelFormatMemberAttribute(ExcelCellFormat excelCellFormat)
        {
            var excelCellFormatType = typeof(ExcelCellFormat);
            var formatMember        = excelCellFormatType.GetMember(excelCellFormat.ToString());

            return((ExcelNumberFormatAttribute)formatMember[0].GetCustomAttribute(typeof(ExcelNumberFormatAttribute), false));
        }
Exemple #3
0
 public ExcelValueObject(string text, ExcelCellFormat format, ExcelCellStyle style, int mergeAcrossCount,
                         int mergeDownCount)
 {
     Text = text;
     Format = format;
     Style = style;
     MergeAcrossCount = mergeAcrossCount;
     MergeDownCount = mergeDownCount;
 }
Exemple #4
0
        public ExcelValueObject(string text, ExcelCellFormat format)
        {
            Text = text;
            Format = format;

            if (format == ExcelCellFormat.DateTime)
            {
                Style = ExcelCellStyle.Date;
                return;
            }

            Style = ExcelCellStyle.Normal;
        }
Exemple #5
0
 public ExcelValueObject(string text, ExcelCellFormat format, ExcelCellStyle style)
 {
     Text = text;
     Format = format;
     Style = style;
 }