diff options
| author | Zsolt Kozaroczy <[email protected]> | 2020-09-11 00:36:29 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-09-11 00:36:29 +0200 |
| commit | 282eec44ef01746ee25931fa6cd287ad083fd40b (patch) | |
| tree | 14504bf429ca264812679ca971c1592853d3f762 /examples/page_setup.rb | |
| parent | 317e8244e4d17c394c1e181f86df3974623fb865 (diff) | |
| download | caxlsx-282eec44ef01746ee25931fa6cd287ad083fd40b.tar.gz caxlsx-282eec44ef01746ee25931fa6cd287ad083fd40b.zip | |
Restructure examples folder (#47)
Split examples into separate markdown files, each containing a description, sample code, and a screenshot of the resulting xlsx document.
The script `generate.rb` is provided to actually generate the example documents by executing the sample code contained in the markdown files.
Diffstat (limited to 'examples/page_setup.rb')
| -rw-r--r-- | examples/page_setup.rb | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/examples/page_setup.rb b/examples/page_setup.rb deleted file mode 100644 index 67a3eeb0..00000000 --- a/examples/page_setup.rb +++ /dev/null @@ -1,11 +0,0 @@ -$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib" -require 'axlsx' -xls = Axlsx::Package.new -wb = xls.workbook -wb.add_worksheet do |ws| - # Excel does not currently follow the specification and will ignore paper_width and paper_height so if you need - # to for a paper size, be sure to set :paper_size - ws.page_setup.set :paper_width => "210mm", :paper_size => 10, :paper_height => "297mm", :orientation => :landscape - ws.add_row %w(AXLSX is cool) -end -xls.serialize "page_setup.xlsx" |
