Top Level Namespace
Defined Under Namespace
Modules: Writexlsx, ZipFileUtils Classes: String, WriteXLSX, WriteXLSXDimensionError, WriteXLSXInsufficientArgumentError, WriteXLSXOptionParameterError
Instance Method Summary collapse
-
#extract_vba_project(src, dest, options = {}) ⇒ Object
src zip filename dest destination directory options :fs_encoding=.
-
#ruby_18 ⇒ Object
:nodoc:.
-
#ruby_19 ⇒ Object
:nodoc:.
Instance Method Details
#extract_vba_project(src, dest, options = {}) ⇒ Object
src zip filename dest destination directory options :fs_encoding=
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'bin/extract_vba.rb', line 10 def extract_vba_project(src, dest, = {}) FileUtils.makedirs(dest) Zip::ZipInputStream.open(src) do |is| loop do entry = is.get_next_entry() break if entry.nil?() if entry.name == 'xl/vbaProject.bin' path = File.join(dest, 'vbaProject.bin') File.open(path, File::CREAT|File::WRONLY|File::BINARY) do |w| w.puts(is.read()) end break end end end end |
#ruby_18 ⇒ Object
:nodoc:
54 55 56 |
# File 'lib/write_xlsx/compatibility.rb', line 54 def ruby_18 #:nodoc: yield end |
#ruby_19 ⇒ Object
:nodoc:
58 59 60 |
# File 'lib/write_xlsx/compatibility.rb', line 58 def ruby_19 #:nodoc: false end |