title: export to public folder using axlsx
body: <p>I am using the axlsx gem to create excel files. I get them serialized in my project home directory as an xlsx file. But I want the file to be created in the public folder of my rails app, or directly downloadable by the user without saving it in the server. How can I do this??
  Here is the controller that generates the xlsx file</p>
  
  <pre><code>def export_excel
      p = Axlsx::Package.new
      wb = p.workbook 
      wb.add_worksheet(:name =&gt; "Basic Worksheet") do |sheet|
      (1..10).each { |label| sheet.add_row [label, rand(24)+1] }
      sheet.add_chart(Axlsx::Bar3DChart, :start_at =&gt; "A14", :end_at =&gt; "F24") do |chart|
          chart.add_series :data =&gt; sheet["B1:B10"], :labels =&gt; sheet["A1:A10"], :title =&gt; sheet["A1"]
      end
    end
    p.serialize('charts.xlsx')    
  
  end
  </code></pre>