summaryrefslogtreecommitdiffhomepage
path: root/examples/example.rb
diff options
context:
space:
mode:
authorStefan Daschek <[email protected]>2012-05-03 17:44:29 +0200
committerStefan Daschek <[email protected]>2012-05-03 17:44:48 +0200
commitc87151a4bd740391b13d3fcf564e9fa7b0f21b29 (patch)
tree998f5fa0090a72dd7f522a10d0cb24bda38b180f /examples/example.rb
parent03103965277963e3c62bb92ce8bb84a177b9d9bd (diff)
downloadcaxlsx-c87151a4bd740391b13d3fcf564e9fa7b0f21b29.tar.gz
caxlsx-c87151a4bd740391b13d3fcf564e9fa7b0f21b29.zip
Add support for printOptions
Diffstat (limited to 'examples/example.rb')
-rwxr-xr-x[-rw-r--r--]examples/example.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/example.rb b/examples/example.rb
index e1fc945e..c74f7455 100644..100755
--- a/examples/example.rb
+++ b/examples/example.rb
@@ -333,12 +333,13 @@ end
#```
-##Specify Page Margins for printing
+##Specify page margins and other options for printing
#```ruby
margins = {:left => 3, :right => 3, :top => 1.2, :bottom => 1.2, :header => 0.7, :footer => 0.7}
-wb.add_worksheet(:name => "print margins", :page_margins => margins) do |sheet|
- sheet.add_row ["this sheet uses customized page margins for printing"]
+options = {:grid_lines => true, :headings => true, :horizontal_centered => true}
+wb.add_worksheet(:name => "print margins", :page_margins => margins, :print_options => options) do |sheet|
+ sheet.add_row ["this sheet uses customized print settings"]
end
#```