The column names are a property of the model, in this case Account, so you can try something like:
account_all = Account.find(:all)
account_all.each do |account|
for
col in Account.content_columns
col.human_name: account.send(col.name)
end
end
Here’s a good example of handling columns/rows:
http://wiki.rubyonrails.org/rails/pages/HowToExportToExcel
Regards,
Dave