summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-05-22 12:08:27 +0900
committerRandy Morgan <[email protected]>2012-05-22 12:08:27 +0900
commitaced2a0c1ec5bebadbe8be00b5734eb5ae9b6685 (patch)
tree6a756bc3316c045cf0d6032637c4663b2a3a0ccd /examples
parentec39d3f360cf48ac4f29f39025190fa7d88ab600 (diff)
downloadcaxlsx-aced2a0c1ec5bebadbe8be00b5734eb5ae9b6685.tar.gz
caxlsx-aced2a0c1ec5bebadbe8be00b5734eb5ae9b6685.zip
show both ecma-376 and open office methods of sheet protection password hashing
Diffstat (limited to 'examples')
-rw-r--r--examples/sheet_protection.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/sheet_protection.rb b/examples/sheet_protection.rb
index f76f5909..68d1fe8d 100644
--- a/examples/sheet_protection.rb
+++ b/examples/sheet_protection.rb
@@ -4,5 +4,8 @@ $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"
require 'axlsx'
p = Axlsx::Package.new
-p.workbook.add_worksheet { |ws| ws.sheet_protection.propper_password = 'fish' }
+p.workbook.add_worksheet(:name => 'ECMA-376') { |ws| ws.sheet_protection.propper_password = 'fish' }
+p.workbook.add_worksheet(:name => 'Open Office') { |ws| ws.sheet_protection.password = 'fish' }
p.serialize 'sheet_protection.xlsx'
+
+