E
E
eldar_web2017-03-28 18:59:30
Ruby on Rails
eldar_web, 2017-03-28 18:59:30

How to upload an excel file in Ruby on Rails so that it can be opened on android?

Here is the excel file upload code:
Controller:

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

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

View: According to this code on the android, it does not read the excel file. This is in standard form, i.e. without any programs for reading excel files. How can the problem be solved?
<table>....</table>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question