エラーが発生します:
index -7 out of array
アレイの何が問題になっていますか? 桁数が多すぎて保存できません。
更新しました
PS - (json からは ID のみを取得します)
answers_from_json = ActiveSupport::JSON.decode(params[:answers_from_json])
answers_from_json.each_with_index do |item, i|
posts = Post.find(:all, :conditions => ["id=?",item.to_i])
sheet[header_y_offset-1,0] = 'Name'
posts.each_with_index do |post,i|
sheet[1+i,0] = post.name
end
end