Created
January 21, 2015 19:26
-
-
Save jtmkrueger/e073eb0da463d78785ae to your computer and use it in GitHub Desktop.
axlsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# controller | |
def show | |
render :xlsx => 'show', :filename => 'simple.xlsx' | |
end | |
#show.xlsx.axlsx | |
Axlsx::Package.new do |p| | |
p.workbook.add_worksheet(:name => "Test") do |sheet| | |
# sheet.add_row [@final_report.id, @final_report.reporting_date, @final_report.created_at] | |
sheet.add_row ['one', 'two', 'three'] | |
end | |
# p.serialize('simple.xlsx') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment