//设置style
ICellStyle cellstyle = workbook.CreateCellStyle();
cellstyle.VerticalAlignment = VerticalAlignment.Center;
cellstyle.Alignment = HorizontalAlignment.Center;
//合并操作
sheet.AddMergedRegion(new CellRangeAddress(index["firstRow"], index["lastRow"], index["firstCol"], index["lastCol"]));//起始行,结束行,起始列,结束列
//设置合并后style
var cell = sheet.GetRow(index["firstRow"]).GetCell(index["firstCol"]);
cell.CellStyle = cellstyle;