diff options
| author | Randy Morgan <[email protected]> | 2012-05-13 11:51:40 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-05-13 11:51:40 +0900 |
| commit | b9adbffcef2ab5c95d38c1dea33ebffcdef47100 (patch) | |
| tree | bf0afea3e84f6149aa4469ae027503cb1aa60359 /examples | |
| parent | 4e538a02e1dbf2bf2877851b73a5a96300cfd088 (diff) | |
| download | caxlsx-b9adbffcef2ab5c95d38c1dea33ebffcdef47100.tar.gz caxlsx-b9adbffcef2ab5c95d38c1dea33ebffcdef47100.zip | |
add example for adding comments to a worksheet.
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/example.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/example.rb b/examples/example.rb index 0027c797..315c7146 100755 --- a/examples/example.rb +++ b/examples/example.rb @@ -57,7 +57,7 @@ wb.add_worksheet(:name => "Cell Level Style Overrides") do |sheet| end #``` -#Using Custom Border Styles +##Using Custom Border Styles #```ruby #Axlsx defines a thin border style, but you can easily create and use your own. @@ -97,7 +97,6 @@ wb.styles do |s| #Set the second column outline level sheet.column_info[1].outlineLevel = 2 - #TODO rows hidden, outline etc. sheet.rows[3].hidden = true sheet.rows[1].outlineLevel = 2 end @@ -344,6 +343,12 @@ wb.add_worksheet(:name => "print margins", :page_margins => margins, :page_setup end #``` +## Add Comments to your spreadsheet +#``` ruby +wb.add_worksheet(:name => 'comments') do |sheet| + sheet.add_row ['Can we build it?'] + sheet.add_comment :ref => 'A1', :author => 'Bob', :text => 'Yes We Can!' +end ##Validate and Serialize |
