diff options
| author | Randy Morgan <[email protected]> | 2012-05-08 09:55:43 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-05-08 09:55:43 +0900 |
| commit | f12d21414f6272903ff274ec1a3add358bde30fb (patch) | |
| tree | a16d645fa1b55f1f478dcde52c3b157cbd01fb74 /examples | |
| parent | 754e2226d618260c4895cf15e54f5c8190345f8e (diff) | |
| download | caxlsx-f12d21414f6272903ff274ec1a3add358bde30fb.tar.gz caxlsx-f12d21414f6272903ff274ec1a3add358bde30fb.zip | |
worksheet comments step 2. Needs docs and specs - but it works in Excel
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/comment.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/comment.rb b/examples/comment.rb new file mode 100644 index 00000000..19e55234 --- /dev/null +++ b/examples/comment.rb @@ -0,0 +1,15 @@ +#!/usr/bin/env ruby -w -s +# -*- coding: utf-8 -*- +$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib" +require 'axlsx' + +p = Axlsx::Package.new +wb = p.workbook + +wb.add_worksheet(:name=>'look mom, comments') do |ws| + ws.add_row [1,2,3] + ws.add_comment :text => "now that is just sexy", :author => "randym", :ref => "A1" +end + +p.validate.each { |e| puts e.message } +p.serialize 'comments.xlsx' |
