Please see the
following documentation link for XLS2PDF conversion. It contains the latest
code and details for XLS2PDF conversion which you may try as per your scenario.
Which version of Aspose.Pdf for Java you are using? Please try latest version for Aspose.Pdf for Java v2.5 as the API structures is changed a bit in it. I am using Aspose.Cells for Java v2.1.2.x and Aspose.Pdf for Java v2.5 and it works fine.
Here is my sample code, kindly check it (see the package import section too). I have also attached my output pdf file here when running sample code with you excel file.
public static void main(String[] args) throws Exception {
//Instantiate the Workbook object Workbook workbook = new Workbook(); workbook.open(“d:\files\Mail_Format.xls”); //Save the document in Aspose.Pdf.Xml format workbook.save(“d:\files\Mail_Format.xml”, FileFormatType.ASPOSE_PDF); //Bind the XML file (containing spreadsheet data) with the Pdf object Pdf pdf = new Pdf(); pdf.bindXML(“d:\files\Mail_Format.xml”, null); //Create the PDF document by calling its save method pdf.save(“d:\files\Mail_Format.pdf”);