E
E
eldar_web2015-12-16 14:03:06
Ruby on Rails
eldar_web, 2015-12-16 14:03:06

Ruby on Rails error when unloading excel when there is a lot of data, what's the problem?

The data in the controller is:

headers['Content-Type'] = "application/vnd.ms-excel; charset=windows-1251"
    headers['Content-Disposition'] = 'attachment; filename="report.xls"'
    headers['Cache-Control'] = ''

    respond_to do |format|
      format.html
      format.xls
    end

And in the view is usually a tabular layout.
So, if there is little data, then it normally unloads, and if there is a lot, for example, 500, 1000, then it does not unload a single one.
How can the problem be solved?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Andreev, 2015-12-16
@eldar_web

What does it write in the logs?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question