summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/example.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/example.rb b/examples/example.rb
index 3487044a..41a08c50 100644
--- a/examples/example.rb
+++ b/examples/example.rb
@@ -201,6 +201,12 @@
sheet.column_widths nil, 3
end
+##Specify Page Margins for printing
+ 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"]
+ end
+
##Validate and Serialize
p.validate.each { |e| puts e.message }
@@ -216,5 +222,6 @@
p.serialize("shared_strings_example.xlsx")
+