diff options
| author | Stefan Daschek <[email protected]> | 2012-05-03 19:46:50 +0200 |
|---|---|---|
| committer | Stefan Daschek <[email protected]> | 2012-05-03 19:46:50 +0200 |
| commit | 58effe424218aa8ba6aa8157b49233df05646308 (patch) | |
| tree | b61306ee59d2d2d52b7a25faa5b1b5105b7e8556 /examples/example.rb | |
| parent | c87151a4bd740391b13d3fcf564e9fa7b0f21b29 (diff) | |
| download | caxlsx-58effe424218aa8ba6aa8157b49233df05646308.tar.gz caxlsx-58effe424218aa8ba6aa8157b49233df05646308.zip | |
Add support for pageSetup.
Diffstat (limited to 'examples/example.rb')
| -rwxr-xr-x | examples/example.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/example.rb b/examples/example.rb index c74f7455..0027c797 100755 --- a/examples/example.rb +++ b/examples/example.rb @@ -337,8 +337,9 @@ end #```ruby margins = {:left => 3, :right => 3, :top => 1.2, :bottom => 1.2, :header => 0.7, :footer => 0.7} +setup = {:fit_to_width => 1, :orientation => :landscape, :paper_width => "297mm", :paper_height => "210mm"} options = {:grid_lines => true, :headings => true, :horizontal_centered => true} -wb.add_worksheet(:name => "print margins", :page_margins => margins, :print_options => options) do |sheet| +wb.add_worksheet(:name => "print margins", :page_margins => margins, :page_setup => setup, :print_options => options) do |sheet| sheet.add_row ["this sheet uses customized print settings"] end #``` |
