【发布时间】:2017-03-22 17:49:05
【问题描述】:
我目前正在使用 Axlsx gem 在 Excel 中创建条形图。但是,我试图在一张纸上创建一个条形图,它引用另一张纸上的值但遇到错误。
这是我的代码:
sheet.add_chart(Axlsx::Bar3DChart, :start_at => "B5", :end_at => "I25", :title=> "Top Weight Step (0.5-15) Volume Month over Month", :barDir => :col) do |bars|
bars.add_series :data => sheet["'Weightsteps Month over Month'!F10:F25"],
:labels => sheet["'Weightsteps Month over Month'!B10:B25"],
:title => sheet["'Weightsteps Month over Month'!F9"]
bars.valAxis.gridlines = false
bars.catAxis.gridlines = false
end
【问题讨论】:
-
你的错误信息是什么?
-
我得到的错误信息是
NoMethodError: undefined method 'row' for nil:NilClass
标签: ruby-on-rails ruby excel charts axlsx