S
S
saniasania2015-02-24 19:45:20
ruby
saniasania, 2015-02-24 19:45:20

How to import an array of hashes into an xls file for later download?

The array looks something like this [{ "a" => 100}, {"b" => 200 }]
The array of objects from the database processes normally, but with a separate array of hashes, nothing comes out!!!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
U
UIRobot, 2015-03-05
@UIRobot

I don't know about others, but for example I didn't understand the question. What do you want to do? Throw your array of hashes into Excel? Or do you manage to shove a separate array into xls, but an array of hashes does not work? clarify

A
Alex, 2015-03-05
@sashasoft

the controller, during operation, makes several requests to the database and writes the result to the hash! this hash can be displayed in the view, but this hash is not visible in sum.xls.erb...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question