Converting Excel to PDF Files in Ruby

Aspose.Cells - Converting Excel to PDF Files

To convert Excel to Pdf file using Aspose.Cells for Java in Ruby, simply invoke excel_to_pdf() method of Converter module.

Ruby Code

 def excel_to_pdf(workbook)

    save_format = Rjb::import('com.aspose.cells.SaveFormat')

    # Save the document in PDF format

    workbook.save(@data_dir + "MyPdfFile.pdf", save_format.PDF)

    puts "Pdf saved successfully."

end 

Download Running Code

Download Converting Excel to PDF Files (Aspose.Cells) from any of the below mentioned social coding sites: