Sha256: e3ee3147a62273957839210dae4e92b3c649cb738e4bee676980183cc5ec17b7
Contents?: true
Size: 610 Bytes
Versions: 2
Compression:
Stored size: 610 Bytes
Contents
require "bundler/setup" Bundler.require DocRaptor.configure do |dr| dr.username = "YOUR_API_KEY_HERE" # dr.debugging = true end $docraptor = DocRaptor::DocApi.new output_file = "ruby-xlsx.xlsx" output_payload = $docraptor.create_doc( test: true, document_content: "<html><body><table><tr><td>Hello from Ruby</td></tr></table></body></html>", name: output_file, document_type: "xlsx", ) File.write(output_file, output_payload) output_type = `file -b #{output_file}` File.delete output_file raise "Output was not an XLSX (zip)" unless output_type.start_with?("Zip")
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
docraptor-2.0.0 | test/xlsx.rb |
docraptor-1.4.0 | test/xlsx.rb |