Method: WordWps::Word#initialize
- Defined in:
- lib/word_wps.rb
#initialize(encoding = "utf-8") ⇒ Word
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/word_wps.rb', line 4 def initialize(encoding = "utf-8") if OS.windows? require "win32ole" else print "只有Windows系统才能使用Excel模块" exit 0 end @word = WIN32OLE.new("Word.Application") @word.visible = false @encoding = encoding end |