summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/comment.rb15
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'