日期:2014-05-17 浏览次数:20560 次
HS[align=left]SFRow row = sheet1.CreateRow(0);//建行
HSSFCell cell = row.CreateCell(0);//建单元格
cell.SetCellValue("测试1");//
//单元格对齐方式
HSSFCellStyle style = hssfWorkBook.CreateCellStyle();
style.Alignment = HSSFCellStyle.ALIGN_CENTER;
//文本样式
HSSFFont font = hssfWorkBook.CreateFont();
font.FontHeight = 18 * 18;
style.SetFont(font);
cell.CellStyle = style;
//合并单元格
sheet1[/align].AddMergedRegion(new Region(0, 0, 0, 6));//行、列、行、列
HSSFRow row = sheet1.CreateRow(0);
row.Height = 100 * 4;