NPOI导出到EXCEL 怎么设置默认行高
1个回答
展开全部
NPOI可以控制样式啊,好好看看官方示例的代码。
ISheet sheet1 = hssfworkbook.CreateSheet("Sheet1");
//set the width of columns
sheet1.SetColumnWidth(0,50 * 256);
sheet1.SetColumnWidth(1, 100 * 256);
sheet1.SetColumnWidth(2, 150 * 256);
//set the width of height
sheet1.CreateRow(0).Height = 100*20;
sheet1.CreateRow(1).Height = 200*20;
sheet1.CreateRow(2).Height = 300*20;
ISheet sheet1 = hssfworkbook.CreateSheet("Sheet1");
//set the width of columns
sheet1.SetColumnWidth(0,50 * 256);
sheet1.SetColumnWidth(1, 100 * 256);
sheet1.SetColumnWidth(2, 150 * 256);
//set the width of height
sheet1.CreateRow(0).Height = 100*20;
sheet1.CreateRow(1).Height = 200*20;
sheet1.CreateRow(2).Height = 300*20;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询