summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-12-04 09:55:58 +0900
committerRandy Morgan <[email protected]>2012-12-04 09:55:58 +0900
commit798e96feccea88648e64f1eb02707375f52cd50c (patch)
tree0f1e2912649fcaeb01f31c318799ed2a475c8bf6 /examples
parent66e1cc2178f78ee225642080b40b9a7811d92b8a (diff)
downloadcaxlsx-798e96feccea88648e64f1eb02707375f52cd50c.tar.gz
caxlsx-798e96feccea88648e64f1eb02707375f52cd50c.zip
Created ios preview example
This shows that shared_strings are required. Formula parsing is still outstanding. https://github.com/randym/axlsx/issues/149
Diffstat (limited to 'examples')
-rw-r--r--examples/ios_preview.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/ios_preview.rb b/examples/ios_preview.rb
new file mode 100644
index 00000000..15367a81
--- /dev/null
+++ b/examples/ios_preview.rb
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby -w -s
+# -*- coding: utf-8 -*-
+$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"
+
+#```ruby
+require 'axlsx'
+
+p = Axlsx::Package.new
+p.use_shared_strings = true
+s = p.workbook.add_worksheet(:name => "Formula test")
+s.add_row [1, 2, 3]
+s.add_row %w(a b c)
+s.add_row ["=SUM(A1:C1)"]
+p.serialize "ios_preview.xlsx"