diff options
| author | Jurriaan Pruis <[email protected]> | 2015-03-14 16:04:32 +0100 |
|---|---|---|
| committer | Jurriaan Pruis <[email protected]> | 2015-03-14 16:04:32 +0100 |
| commit | 1d6698ceac568ffe7d8cb9b9237761adba2e2251 (patch) | |
| tree | 1a1262f87fbaedc1c4d2aaaee5b542a25845ec28 /examples/example.rb | |
| parent | 7d642038ddef2f78f826b86fee75180ffe17d215 (diff) | |
| parent | 1174046dfd6294d8928e53cb6e5b56c128f18c2d (diff) | |
| download | caxlsx-1d6698ceac568ffe7d8cb9b9237761adba2e2251.tar.gz caxlsx-1d6698ceac568ffe7d8cb9b9237761adba2e2251.zip | |
Merge pull request #354 from rishijain/patch-1
Added an example of row height
Diffstat (limited to 'examples/example.rb')
| -rwxr-xr-x | examples/example.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/examples/example.rb b/examples/example.rb index 116ce730..eebfc868 100755 --- a/examples/example.rb +++ b/examples/example.rb @@ -14,6 +14,7 @@ examples << :surrounding_border examples << :deep_custom_borders examples << :row_column_style examples << :fixed_column_width +examples << :height examples << :outline_level examples << :merge_cells examples << :images @@ -246,6 +247,21 @@ if examples.include? :fixed_column_width end end + +##Specifying Row height + +#```ruby +if examples.include? :height + wb.styles do |s| + head = s.add_style :bg_color => "00", :fg_color => "FF" + wb.add_worksheet(:name => "fixed row height") do |sheet| + sheet.add_row ["This row will have a fixed height", "It will overwite the default row height"], :height => 30 + sheet.add_row ["This row can have a different height too"], :height => 10, :style => head + end + end +end + + #```ruby if examples.include? :outline_level wb.add_worksheet(name: 'outline_level') do |sheet| @@ -825,4 +841,4 @@ if examples.include? :rich_text end p.serialize 'rich_text.xlsx' end -#```
\ No newline at end of file +#``` |
