Sha256: 08d869a135a9c2e783ea6ff0ee5d767562dad8b4cd977b6d2bb04eaf26eeabb8
Contents?: true
Size: 610 Bytes
Versions: 2
Compression:
Stored size: 610 Bytes
Contents
#!/usr/bin/env ruby # require "rails" # workaround: openxml-package uses `extract_options!` $:.push Dir.pwd + "/lib" require "openxml/docx" document = OpenXml::Docx::Package.new include OpenXml::Docx::Elements text = Text.new("Some text that I want to include in my new OOXML document") run = Run.new run << text paragraph = Paragraph.new paragraph << run document.document << paragraph filename = "gemtest1.docx" system "rm -f ~/Desktop/#{filename}" # -f so that we don't have an error if the file doesn't exist document.save File.expand_path("~/Desktop/#{filename}") exec "open ~/Desktop/#{filename}"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
openxml-docx-0.8.0 | example |
openxml-docx-0.8.0.beta1 | example |