您好,给您贴一段代码,您可以参考一下:
- function hideRowSpan(sheet, row, col, viewport) {
- sheet.suspendPaint();
- var span = sheet.getSpan(row,col,viewport);
- if(span){
- var rowCount = span.rowCount;
- for(var i=row; i<row+rowCount; i++){
- sheet.setRowVisible(i, false, viewport);
- }
- }else{
- sheet.setRowVisible(row, false, viewport);
- }
- sheet.resumePaint();
- }
复制代码 |