diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/sheet_protection.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/sheet_protection.rb b/examples/sheet_protection.rb new file mode 100644 index 00000000..be6cf677 --- /dev/null +++ b/examples/sheet_protection.rb @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby -w -s +# -*- coding: utf-8 -*- +$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib" +require 'axlsx' + +p = Axlsx::Package.new +p.workbook.add_worksheet { |ws| ws.sheet_protection.password = 'fish' } +p.serialize 'sheet_protection.xlsx' |
