C# 获取Excel中的合并单元格


using Spire.Xls;   namespace Detect_Merged_Cells {     class Program     {         static void Main(string[] args)         {             Workbook workbook = newWorkbook();             workbook.LoadFromFile("测试.xlsx");             Worksheet sheet = workbook.Worksheets[0];             CellRange[] range = sheet.MergedCells;             foreach(CellRange cell inrange)             {                cell.UnMerge();             }             workbook.SaveToFile("输出.xlsx");         }     } }
相关文章

相关标签/搜索