找回密码
 立即注册

QQ登录

只需一步,快速开始

jasonleeoffice

注册会员

19

主题

64

帖子

177

积分

注册会员

积分
177

[已处理] json转换问题

jasonleeoffice
注册会员   /  发表于:2018-12-22 11:08  /   查看:3102  /  回复:2
本帖最后由 jasonleeoffice 于 2018-12-22 18:31 编辑

{"version":"11.1.0","showHorizontalScrollbar":false,"showVerticalScrollbar":false,"scrollbarMaxAlign":true,"tabStripVisible":false,"tabNavigationVisible":false,"sheets":{"Sheet1":{"name":"Sheet1","rowCount":8,"columnCount":10,"activeRow":2,"activeCol":3,"theme":"Office","data":{"dataTable":{"2":{"0":{"value":0,"formula":"SUM(A1,A2)"},"1":{"value":0,"style":{"hAlign":1,"vAlign":0,"themeFont":"Body","formatter":"@","imeMode":1},"formula":"SUM(B1,B2)"}},"3":{"0":{"value":0,"formula":"A1"},"1":{"value":0,"formula":"B1"}},"4":{"0":{"value":0,"formula":"A2"},"1":{"value":0,"style":{"hAlign":1,"vAlign":0,"themeFont":"Body","formatter":"@","imeMode":1},"formula":"B2"}},"5":{"0":{"value":0,"formula":"A3"},"1":{"value":0,"style":{"hAlign":1,"vAlign":0,"themeFont":"Body","formatter":"@","imeMode":1},"formula":"B3"}}},"defaultDataNode":{"style":{"hAlign":1,"formatter":"@"}}},"rowHeaderData":{"defaultDataNode":{"style":{"themeFont":"Body"}}},"colHeaderData":{"defaultDataNode":{"style":{"themeFont":"Body"}}},"spans":[{"row":2,"rowCount":4,"col":3,"colCount":3}],"selections":{"0":{"row":2,"rowCount":4,"col":3,"colCount":3},"length":1},"index":0}},"customFunctions":{"ROUND":{"name":"ROUND","minArgs":0,"maxArgs":0,"typeName":"mynamespace.MyFunction"}}}


我在本地测试没问题,部署到本机上就出问题了
spread.fromJSON(JSON.parse(template.JsonData));    这里出错了
image.png127224120.png

2 个回复

倒序浏览
jasonleeoffice
注册会员   /  发表于:2018-12-22 18:30:25
沙发
找到问题了,放在配置的ip上就没问题了。不过有个建议,如果不是在配置的ip上是不是应该显示水印,而不是报错
回复 使用道具 举报
KevinChen讲师达人认证 悬赏达人认证 SpreadJS 开发认证
论坛元老   /  发表于:2018-12-24 09:30:47
板凳
您好,很高兴您解决了问题,感谢您的建议,您的建议很有价值,我这边会跟相关研发人员沟通。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部