即使公式正确,Handsontable也会抛出#VALUE错误。
要了解我的问题,请使用以下数据替换此示例http://jsfiddle.net/qfpfxgw5/中的var data1。
var data1 =
[
["","","","","","","","","",""],
["","","","","","","","","",""],
["","","","","","","","","",""],
["","","","","","","","","",""],
["","","","","","","","","",""],
["","","","","","","","","",""],
["","","","","","","","","",""],
["","","","","","","","","",""],
["","","=C13-C14","=D13-D14","=E13-E14","=F13-F14","=G13-G14","=H13-H14","=I13-I14","=SUM(C9:I9)"],
["","","985149",21651,35565,985149,548,312495,35195,"=SUM(C10:I10)"],
["","",3563546,35635,35635,75345,54245,723445,53577,"=SUM(C11:I11)"],
["","",0,0,35565,0,0,312495,0,"=SUM(C12:I12)"],
["","",3563546,35635,"=D13+E10+E12","=E13+F10+F12","=G12+G10+F13","=H12+H10+G13","=I12+I10+H13","=SUM(C13:I13)"],
["","",3563546,35635,"=D14+E11","=E14+F11","=F14+G11","=G14+H11","=H14+I11","=SUM(C14:I14)"],
["","",50,50,50,50,50,50,50,"=SUM(C15:I15)"],
["","",3550,3550,3621,4800,3550,3550,3300,"=SUM(C16:I16)"],
["","",8,8,8,8,8,8,8,"=SUM(C17:I17)"]
];
然后跑。
你会看到#VALUE! E9,F9等错误。
我们有
E9=E13-E14;
E13=D13+E10+E12; and
E14=D14+E11
为什么它没有给出预期的输出,直到我再次重置E9 = E13-E14的值。应该解决它的另一个解决方案是什么? 提前谢谢。
答案 0 :(得分:0)
我假设因为那些细胞也附有配方。因此,出于某种原因,如果因为这一点而无法提供。
解决方案?,不确定,我尝试从其他单元格中获取一个带有公式的单元格,以查看是否可能一旦渲染,下面的单元格将起作用,但它没有。
编辑:我实际上正在寻找类似的东西,并提出了一个不那么漂亮的解决方案:
http://jsfiddle.net/qfpfxgw5/2/
基本上,如果您从一个也具有与之关联的功能的单元格中引用一个值,它就不会起作用。
因此,为了使其有效,您必须在当前单元格的公式中包含该其他单元格的实际公式。
示例:
cellA13: = E13-E14
cellE13: = SUM(B2,B3)
cellE14: = 100
这不起作用,但是如果你改成它:
cellA13: =SUM((SUM(B2,B3))-E14)
cellE13: =SUM(B2,B3)
cellE14: =100
我上面的例子做了类似的事情并且有效。
丑陋......但我不知道如何让它发挥作用。