示例#1
0
 public ExcelRangeTableHeaderStyle(Excel.Worksheet sheetToFormat, ExcelCellCoordinate topLeft, ExcelCellCoordinate bottomRight)
     : base(sheetToFormat, topLeft, bottomRight)
 {
     this.backStyle = new ExcelRangeBackColourStyle(this.sheetToFormat, this.topLeft, this.bottomRight)
     {
         BackColour = Color.LightBlue
     };
 }
        private void ExportResultsToExcel <T>(ExcelWorkBookAdaptor wbk, List <T> results, ExcelCellCoordinate coord)
        {
            var pipe = new ObjectPropertiesToExcelAdapter <T>(wbk[0], results);

            pipe.Write(coord);

            ExcelCellCoordinate  bottomRight = new ExcelCellCoordinate(coord.Row + results.Count, coord.Col + PropertyCount(results) - 1);
            ExcelRangeTableStyle style       = new ExcelRangeTableStyle(wbk[0], coord, bottomRight)
            {
                FirstRowContainHeaders = true
            };

            style.Execute();
        }
 public AbstractDefaultExcelRangeStyle(Excel.Worksheet sheetToFormat, ExcelCellCoordinate topLeft, ExcelCellCoordinate bottomRight)
 {
     this.sheetToFormat = sheetToFormat;
     this.topLeft = topLeft;
     this.bottomRight = bottomRight;
 }
示例#4
0
 public AbstractDefaultExcelRangeStyle(Excel.Worksheet sheetToFormat, ExcelCellCoordinate topLeft, ExcelCellCoordinate bottomRight)
 {
     this.sheetToFormat = sheetToFormat;
     this.topLeft       = topLeft;
     this.bottomRight   = bottomRight;
 }
 public ExcelRangeTableStyle(Excel.Worksheet sheetToFormat, ExcelCellCoordinate topLeft, ExcelCellCoordinate bottomRight)
     : base(sheetToFormat, topLeft, bottomRight)
 {
 }
示例#6
0
        private void button3_Click(object sender, EventArgs e)
        {
            var coord = new ExcelCellCoordinate(5, Convert.ToInt32(this.txtCol.Text));

            Console.WriteLine(coord.ToString());
        }
 public ExcelRangeSolidBorderStyle(Excel.Worksheet sheetToFormat, ExcelCellCoordinate topLeft, 
     ExcelCellCoordinate bottomRight)
     : base(sheetToFormat, topLeft, bottomRight)
 {
 }
 public ExcelRangeTableHeaderStyle(Excel.Worksheet sheetToFormat, ExcelCellCoordinate topLeft, ExcelCellCoordinate bottomRight)
     : base(sheetToFormat, topLeft, bottomRight)
 {
     this.backStyle = new ExcelRangeBackColourStyle(this.sheetToFormat, this.topLeft, this.bottomRight)
         { BackColour = Color.LightBlue };
 }
示例#9
0
 public ExcelRangeBackColourStyle(Excel.Worksheet sheetToFormat, ExcelCellCoordinate topLeft, ExcelCellCoordinate bottomRight)
     : base(sheetToFormat, topLeft, bottomRight)
 {
     this.BackColour = Color.PeachPuff;
 }
 public ExcelRangeBackColourStyle(Excel.Worksheet sheetToFormat, ExcelCellCoordinate topLeft, ExcelCellCoordinate bottomRight)
     : base(sheetToFormat, topLeft, bottomRight)
 {
     this.BackColour = Color.PeachPuff;
 }