Ruby での PDF の Excel ワークブックへの変換
Contents
[
Hide
]
Aspose.PDF - PDF から Excel ワークブックへの変換
PDF ドキュメントを Excel ワークブックに変換するには、Aspose.PDF Java for Ruby を使用して、PdfToExcel モジュールを呼び出してください。
Ruby コード
# The path to the documents directory.
data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
# Open the target document
pdf = Rjb::import('com.aspose.pdf.Document').new(data_dir + 'input1.pdf')
# Instantiate ExcelSave Option object
excelsave = Rjb::import('com.aspose.pdf.ExcelSaveOptions').new
# Save the output to XLS format
pdf.save(data_dir + "Converted_Excel.xls", excelsave)
puts "Document has been converted successfully"
実行コードのダウンロード
Convert PDF to DOC or DOCX (Aspose.PDF) を、以下に記載されたいずれかのソーシャルコーディングサイトからダウンロードしてください。