diff options
| author | Randy Morgan <[email protected]> | 2012-02-25 17:21:42 +0900 |
|---|---|---|
| committer | Sean Duckett <[email protected]> | 2012-03-07 14:45:01 -0600 |
| commit | 1cebe7fa50b71bb0b7d2e6dd0f934a2eb9e1e80b (patch) | |
| tree | 5068b8c3d444bb99851cba2c09d6af1a1050e70e /examples/example.rb | |
| parent | 5d0c81118bac73ab0b18804ca1a3039db9cb69dd (diff) | |
| download | caxlsx-1cebe7fa50b71bb0b7d2e6dd0f934a2eb9e1e80b.tar.gz caxlsx-1cebe7fa50b71bb0b7d2e6dd0f934a2eb9e1e80b.zip | |
readme and examples updates
Diffstat (limited to 'examples/example.rb')
| -rw-r--r-- | examples/example.rb | 7 |
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") + |
