您好,需要清除指定区域的合并单元格,您需将AutoMerge指定为none即可。
- var range = new spreadNS.Range(2, 1, 10, 5);
- sheet.autoMerge(range, spreadNS.AutoMerge.AutoMergeDirection.column, spreadNS.AutoMerge.AutoMergeMode.free);
- //清除指定区域的合并单元格
- var range = new spreadNS.Range(2, 1, 10, 5);
- sheet.autoMerge(range, spreadNS.AutoMerge.AutoMergeDirection.none);
- var range = new spreadNS.Range(2, 1, 15, 5);
- sheet.autoMerge(range, spreadNS.AutoMerge.AutoMergeDirection.column, spreadNS.AutoMerge.AutoMergeMode.free);
复制代码 我这边给您做了个demo您可以看一下,上面是关键代码,将原区域的AutoMerge指定为none,再为新的区域指定AutoMergeDirection。
|