找回密码
 立即注册

QQ登录

只需一步,快速开始

dept_estate_dev

初级会员

35

主题

115

帖子

326

积分

初级会员

积分
326
dept_estate_dev
初级会员   /  发表于:2016-12-27 15:57  /   查看:3062  /  回复:3
var comment = new GC.Spread.Sheets.Comments.Comment();
                                                                comment.text(str);
                                                                comment.dynamicMove(true);
                                                                comment.dynamicSize(true);
                                                                comment.width(500);
                                                                comment.height(100);
                                                                comment.locked(false);
                                                                sheet.getCell(row, column).comment(comment);


设置完之后comment还是只有这么短。
此处D列是最后一列。
blob500075377.png

3 个回复

倒序浏览
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2016-12-27 16:21:52
沙发
我这里试了下您的代码,挺大的。 要不您把json发来
回复 使用道具 举报
dept_estate_dev
初级会员   /  发表于:2016-12-27 16:32:00
板凳
{"version":"10.0.1","allowUserDragDrop":false,"defaultDragFillType":3,"scrollbarMaxAlign":true,"tabStripVisible":false,"allowCopyPasteExcelStyle":false,"sheets":{"Sheet1":{"name":"Sheet1","frozenRowCount":1,"frozenColCount":2,"rowCount":12,"columnCount":4,"activeRow":7,"activeCol":2,"data":{"dataTable":{"0":{"0":{"value":"资金类型","style":{"hAlign":1,"formatter":"yyyy-MM-dd"}},"1":{"value":"总计","style":{"hAlign":1,"formatter":"yyyy-MM-dd"}},"2":{"value":"/OADate(42369)/","style":{"hAlign":1,"formatter":"yyyy-MM-dd"}},"3":{"value":"/OADate(42731.68718020833)/","style":{"hAlign":1,"formatter":"yyyy-MM-dd"}}},"1":{"0":{"value":"注册资本投入"},"1":{"value":24690,"style":{"hAlign":2,"formatter":"#,##0.00_ "},"formula":"SUM(C22)"},"2":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}},"3":{"value":24690,"style":{"hAlign":2,"formatter":"#,##0.00_ "}}},"2":{"0":{"value":"注册资本偿还"},"1":{"value":37035,"style":{"hAlign":2,"formatter":"#,##0.00_ "},"formula":"SUM(C33)"},"2":{"value":24690,"style":{"hAlign":2,"formatter":"#,##0.00_ "}},"3":{"value":12345,"style":{"hAlign":2,"formatter":"#,##0.00_ "}}},"3":{"0":{"value":"股东借款本金投入"},"1":{"value":0,"style":{"hAlign":2,"formatter":"#,##0.00_ "},"formula":"SUM(C44)"},"2":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}},"3":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}}},"4":{"0":{"value":"股东借款本金还款"},"1":{"value":0,"style":{"hAlign":2,"formatter":"#,##0.00_ "},"formula":"SUM(C55)"},"2":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}},"3":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}}},"5":{"0":{"value":"股东借款利息(项目公司支付)"},"1":{"value":0,"style":{"hAlign":2,"formatter":"#,##0.00_ "},"formula":"SUM(C66)"},"2":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}},"3":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}}},"6":{"0":{"value":"利息营业税/利息增值税"},"1":{"value":0,"style":{"hAlign":2,"formatter":"#,##0.00_ "},"formula":"SUM(C77)"},"2":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}},"3":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}}},"7":{"0":{"value":"股权溢价部分"},"1":{"value":0,"style":{"hAlign":2,"formatter":"#,##0.00_ "},"formula":"SUM(C88)"},"2":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}},"3":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}}},"8":{"0":{"value":"资金占用费"},"1":{"value":0,"style":{"hAlign":2,"formatter":"#,##0.00_ "},"formula":"SUM(C99)"},"2":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}},"3":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}}},"9":{"0":{"value":"分红"},"1":{"value":0,"style":{"hAlign":2,"formatter":"#,##0.00_ "},"formula":"SUM(C1010)"},"2":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}},"3":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}}},"10":{"0":{"value":"盈余现金流"},"1":{"value":0,"style":{"hAlign":2,"formatter":"#,##0.00_ "},"formula":"SUM(C1111)"},"2":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}},"3":{"style":{"hAlign":2,"formatter":"#,##0.00_ "}}},"11":{"0":{"value":"投资余额"},"1":{"value":61725,"style":{"hAlign":2,"formatter":"#,##0.00_ "},"formula":"B2+B3+B4+B5+B8"},"2":{"value":24690,"style":{"hAlign":2,"formatter":"#,##0.00_ "},"formula":"C2+C3+C4+C5+C8"},"3":{"value":37035,"style":{"hAlign":2,"formatter":"#,##0.00_ "},"formula":"D2+D3+D4+D5+D8"}}},"defaultDataNode":{"style":{"hAlign":0,"themeFont":"Body","borderLeft":{"color":"#cfcfcf","style":1},"borderTop":{"color":"#cfcfcf","style":1},"borderRight":{"color":"#cfcfcf","style":1},"borderBottom":{"color":"#cfcfcf","style":1}}}},"rowHeaderData":{"defaultDataNode":{"style":{"themeFont":"Body"}}},"colHeaderData":{"defaultDataNode":{"style":{"themeFont":"Body"}}},"selections":{"0":{"row":7,"rowCount":1,"col":2,"colCount":1},"length":1},"theme":"Office","columns":[{"size":250},{"size":100},{"size":100},{"size":100}],"comments":[{"rowIndex":2,"colIndex":2,"text":"总共有2条资金往来:\n12345\n12345","width":98,"locked":false,"zIndex":897},{"rowIndex":1,"colIndex":3,"text":"总共有2条资金往来:\n12345\n12345","location":{"x":-207,"y":-7},"width":98,"locked":false,"zIndex":898}],"clipBoardOptions":1,"frozenlineColor":"rgba(255,0,0,0)","isProtected":true,"protectionOptions":{"allowSelectLockedCells":true,"allowResizeRows":true,"allowResizeColumns":true},"index":0}}}
回复 使用道具 举报
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2016-12-27 17:02:37
地板
您好, 因为您有两个冻结列,所以现实不下,自动缩小了。如果您设置的值不合理,会自动变化。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部