找回密码
 立即注册

QQ登录

只需一步,快速开始

汇新泓博
初级会员   /  发表于:2023-1-13 12:07  /   查看:996  /  回复:1
1金币

最佳答案

查看完整内容

Excel中是无法设置某个单元格的高和宽的,或者换句话说设置的高和宽其实是该单元格或者区域所对应的行列的行高和列宽,所以您可以通过setRowHeight和setColumnWidth去设置行高和列宽 setRowHeight: https://demo.grapecity.com.cn/spreadjs/help/api/classes/GC.Spread.Sheets.Worksheet#setrowheight setColumnWidth: https://demo.grapecity.com.cn/spreadjs/help/api/classes/GC.Spread.Sheets.Worksheet#setcolumnwidth ...

1 个回复

倒序浏览
最佳答案
最佳答案
Clark.Pan讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2023-1-13 12:07:46
来自 2#
Excel中是无法设置某个单元格的高和宽的,或者换句话说设置的高和宽其实是该单元格或者区域所对应的行列的行高和列宽,所以您可以通过setRowHeight和setColumnWidth去设置行高和列宽
setRowHeight:
https://demo.grapecity.com.cn/sp ... ksheet#setrowheight
setColumnWidth:
https://demo.grapecity.com.cn/sp ... heet#setcolumnwidth
另外,如果是一片区域,可以通过getRange获取该片区域,然后在返回结果中获取区域的row,col,rowCount,colCount索引。根据这些信息写循环进行设置区域内对应行列的行高和列宽。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部