1. 使用Aspose.Cells合并单元格
下载Aspose包,可以去Nuget网站下载NuGet Gallery | Packages matching aspose
也可以使用vs安装Nuget包
语法:
public void Merge(int firstRow, int firstColumn, int totalRows, int totalColumns);
实现代码:
using Aspose.Cells; using System.Drawing; Workbook workbook=new Workbook(); WorkSheet worksheet=workbook.WorkSheet[0]; worksheet.cells.Merge(0, 0, 2 , 1);//合并第一行第一列开始2个同列单元格
标签:C#,Cells,Excel,Nuget,int,Aspose,操作 From: https://www.cnblogs.com/kezhang/p/17899643.html