Excel使用merge命令进行单元格合并,合并后内容为第一个非空单元格内容
range = sheet1.Range[sheet1.Cells[P.Last_Excel_Row, "A"], sheet1.Cells[P.Last_Excel_Row, "C"]]; range.Merge(); range.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter;
Excel使用merge命令进行单元格合并,合并后内容为第一个非空单元格内容
range = sheet1.Range[sheet1.Cells[P.Last_Excel_Row, "A"], sheet1.Cells[P.Last_Excel_Row, "C"]]; range.Merge(); range.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter;