summaryrefslogtreecommitdiffhomepage
path: root/examples/example.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-03-23 01:15:37 +0900
committerRandy Morgan <[email protected]>2012-03-23 01:15:37 +0900
commit7881ee37e08d7768f8ba7c9270f2f07ea8b78cd0 (patch)
tree038c64817592db5a0a77fcf96151132001ca76af /examples/example.rb
parent43d31eb7c4f04e3ddf3bf865d55e6ce8de7b7a69 (diff)
downloadcaxlsx-7881ee37e08d7768f8ba7c9270f2f07ea8b78cd0.tar.gz
caxlsx-7881ee37e08d7768f8ba7c9270f2f07ea8b78cd0.zip
readme and examples updates.
Diffstat (limited to 'examples/example.rb')
-rw-r--r--examples/example.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/example.rb b/examples/example.rb
index 2b4f795b..36fe6b37 100644
--- a/examples/example.rb
+++ b/examples/example.rb
@@ -24,6 +24,19 @@ wb.styles do |s|
end
end
+#Using Custom Border Styles
+
+wb.styles do |s|
+ red_border = s.add_style :border => {:style=>:thin, :color =>"FFFF0000"}
+ blue_border = s.add_style :border => {:style=>:thin, :color =>"FF0000FF"}
+
+ wb.add_worksheet(:name => "Custom Borders") do |sheet|
+ sheet.add_row ["wrap", "me", "Up in Red"], :style => red_border
+ sheet.add_row [1, 2, 3], :style => blue_border
+ end
+end
+
+
##Using Custom Formatting and date1904
require 'date'
wb.styles do |s|
@@ -37,6 +50,7 @@ wb.styles do |s|
end
end
+
##Add an Image
wb.add_worksheet(:name => "Images") do |sheet|