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
| worksheet.Cells[5, 3].Style.Numberformat.Format = "#,##0.00";
worksheet.Cells[1, 1].Style.HorizontalAlignment = ExcelHorizontalAlignment.Center; worksheet.Cells[1, 1].Style.VerticalAlignment = ExcelVerticalAlignment.Center; worksheet.Cells[1, 4, 1, 5].Merge = true; worksheet.Cells.Style.WrapText = true;
worksheet.Cells[1, 1].Style.Font.Bold = true; worksheet.Cells[1, 1].Style.Font.Color.SetColor(Color.White); worksheet.Cells[1, 1].Style.Font.Name = "微软雅黑"; worksheet.Cells[1, 1].Style.Font.Size = 12;
worksheet.Cells[1, 1].Style.Fill.PatternType = ExcelFillStyle.Solid; worksheet.Cells[1, 1].Style.Fill.BackgroundColor.SetColor(Color.FromArgb(128, 128, 128));
worksheet.Cells[1, 1].Style.Border.BorderAround(ExcelBorderStyle.Thin, Color.FromArgb(191, 191, 191)); worksheet.Cells[1, 1].Style.Border.Bottom.Style = ExcelBorderStyle.Thin; worksheet.Cells[1, 1].Style.Border.Bottom.Color.SetColor(Color.FromArgb(191, 191, 191));
worksheet.Cells.Style.ShrinkToFit = true; worksheet.Row(1).Height = 15; worksheet.Row(1).CustomHeight = true; worksheet.Column(1).Width = 15;
worksheet.View.ShowGridLines = false; worksheet.Cells.Style.Fill.PatternType = ExcelFillStyle.Solid; worksheet.Cells.Style.Fill.BackgroundColor.SetColor(Color.LightGray); worksheet.BackgroundImage.Image = Image.FromFile(@"firstbg.jpg");
|