Skip to content

Excel cant open this file format error  #49

@saroar

Description

@saroar

i like to download for each index or show page
here in my code look like

collection_action :download_xlsx, method: :get do
project = Project.find(params[:id])
send_data(filename: "#{project.project_name}.xlsx", type: "application/xlsx")
end

index do
column 'Download Links' do |c|
link_to 'Download', download_xlsx_admin_projects_path(id: c.id, format: :xlsx)
end
end

http://prntscr.com/bxrumt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions