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.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.View.ShowGridLines = false ; //去掉sheet的网格线
worksheet.Cells.Style.Fill.PatternType = ExcelFillStyle.Solid;
worksheet.Cells.Style.Fill.BackgroundColor.SetColor(Color.LightGray); //设置背景色 worksheet.BackgroundImage.Image = Image.FromFile( @"firstbg.jpg" ); //设置背景图片 ExcelPicture picture = worksheet.Drawings.AddPicture( "logo" , Image.FromFile( @"firstbg.jpg" )); //插入图片 picture.SetPosition(100, 100); //设置图片的位置 picture.SetSize(100, 100); //设置图片的大小 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.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.View.ShowGridLines = false ; //去掉sheet的网格线
worksheet.Cells.Style.Fill.PatternType = ExcelFillStyle.Solid;
worksheet.Cells.Style.Fill.BackgroundColor.SetColor(Color.LightGray); //设置背景色 worksheet.BackgroundImage.Image = Image.FromFile( @"firstbg.jpg" ); //设置背景图片 ExcelPicture picture = worksheet.Drawings.AddPicture( "logo" , Image.FromFile( @"firstbg.jpg" )); //插入图片 picture.SetPosition(100, 100); //设置图片的位置 picture.SetSize(100, 100); //设置图片的大小
Python绘制相关性矩阵 python 相关矩阵

一、生成单位阵        numpy.identity(N) 和 numpy.eye(N) 都可以用来产生单位阵,且产生的单位阵都是 np.array() 类型,矩阵元素都是 float 型。import numpy as np a = np.eye(4) b = np.identity(4) print(ty