diff options
| author | Randy Morgan <[email protected]> | 2013-04-28 12:55:46 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2013-04-28 12:55:46 +0900 |
| commit | e49aee3e2f700569a519c5346746d239a05383cf (patch) | |
| tree | 7f449191165a3fbdf05b34c4239dda6ec179d033 /examples | |
| parent | a120fdb2e787986ced4952b6ef3f4b70056960d9 (diff) | |
| download | caxlsx-e49aee3e2f700569a519c5346746d239a05383cf.tar.gz caxlsx-e49aee3e2f700569a519c5346746d239a05383cf.zip | |
Refactored and renamed space preservation
preserve_spaces has been moved to the workbook and renamed xml_space as
that provides a good reference for people trying to figure out what it
does, and let's the author specify space preservation for
serializations using the shared strings table as well as the default
inline serialization in cells.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/2010_comments.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/2010_comments.rb b/examples/2010_comments.rb new file mode 100644 index 00000000..6a7bedf8 --- /dev/null +++ b/examples/2010_comments.rb @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby -w -s +# -*- coding: utf-8 -*- +$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib" + +#```ruby +require 'axlsx' +p = Axlsx::Package.new +p.workbook.add_worksheet(:name => 'Excel 2010 comments') do |sheet| + sheet.add_row ['Cell with visible comment'] + sheet.add_row + sheet.add_row + sheet.add_row ['Cell with hidden comment'] + + sheet.add_comment :ref => 'A1', :author => 'XXX', :text => 'Visibile' + sheet.add_comment :ref => 'A4', :author => 'XXX', :text => 'Hidden', :visible => false +end +p.serialize('excel_2010_comment_test.xlsx') |
