excel - Where does the .xlsx file creates when creating using axlsx gem in ruby -
where .xlsx file creates when creating using axlsx gem in ruby.
this example taken axslx homepage:
axlsx::package.new |p| p.workbook.add_worksheet(:name => "pie chart") |sheet| sheet.add_row ["simple pie chart"] %w(first second third).each { |label| sheet.add_row [label, rand(24)+1] } sheet.add_chart(axlsx::pie3dchart, :start_at => [0,5], :end_at => [10, 20], :title => "example 3: pie chart") |chart| chart.add_series :data => sheet["b2:b4"], :labels => sheet["a2:a4"], :colors => ['ff0000', '00ff00', '0000ff'] end end p.serialize('simple.xlsx') end
do file created serialize()
call. filename specifiy there relative working directory. can find dir.pwd
Comments
Post a Comment