找回密码
 立即注册

QQ登录

只需一步,快速开始

森森
金牌服务用户   /  发表于:2024-4-19 09:18  /   查看:337  /  回复:1
1金币

sheet.addRows(0, 1);
      sheet.addColumns(0, 1);
怎么设置新增行和列的指定宽高啊


最佳答案

查看完整内容

您好,可以通过事件来实现这个需求:

1 个回复

倒序浏览
最佳答案
最佳答案
Joestar.XuSpreadJS 开发认证
超级版主   /  发表于:2024-4-19 09:18:48
来自 3#
您好,可以通过事件来实现这个需求:

  1. sheet.bind(GC.Spread.Sheets.Events.RowChanged, function (e, info) {
  2.   console.log(info);
  3.   if (info.propertyName == 'addRows') {
  4.     sheet.setRowHeight(info.row, 36);
  5.   }
  6. });

  7. sheet.bind(GC.Spread.Sheets.Events.ColumnChanged, function (e, info) {
  8.   console.log(info);
  9.   if (info.propertyName == 'addColumns') {
  10.     sheet.setColumnWidth(info.col, 36);
  11.   }
  12. });
复制代码
SpreadJS 17.0.8 | GcExcel 7.1.1 已发布~
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部