Converting Excel to PDF Files in Ruby

Aspose.Cells - Converting Excel to PDF Files

To convert Excel to PDF files using Aspose.Cells for Java in Ruby, simply invoke the excel_to_pdf() method of the 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 Sample Code

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