summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/example.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/example.rb b/examples/example.rb
index e88ffd32..9e4b0277 100644
--- a/examples/example.rb
+++ b/examples/example.rb
@@ -187,6 +187,13 @@
sheet.auto_filter = "A2:D5"
end
+##Specifying Column Widths
+
+ wb.add_worksheet(:name => "custom column widths") do |sheet|
+ sheet.add_row ["I use autowidth and am very wide", "I use a custom width and am narrow"]
+ sheet.auto_fit_data[1][:fixed] = 3
+ end
+
##Validate and Serialize
p.validate.each { |e| puts e.message }
@@ -197,6 +204,7 @@
##Using Shared Strings
+
p.use_shared_strings = true
p.serialize("shared_strings_example.xlsx")