ExcelToPdf conversion

Hi,
I was trying to convert an xcel file to pdf,but the output pdf is not coming in the correct format.I mean each column in the excel is coming in each page in the pdf.Can i get a solution for this. I need each sheet in the excel file to come in each page of pdf.

Hi,

Thanks for your posting and using the Aspose.Cells for Java.

Please download and try the latest version:

Aspose.Cells for Java 7.1.2



If the problem still persists, then please provide us your source xls/xlsx files and the code to replicate the problem.

We will look into it and help you soon.

Hi,
Thanks for the reply,but sadfully its not working for me. I downloaded the latest version and used the jars,but problem still exists. Here is my code:

package com.aspose.cells.Conversion;

import com.aspose.cells.FileFormatType;
import com.aspose.cells.Workbook;
public class xcelToPdf {
public static void main(String args[]) throws Exception{
Workbook wb=new Workbook(“D:\Xcel\C4stg_test.xls”);
wb.save(“D:\try\c4.pdf”, FileFormatType.ASPOSE_PDF);

}

}

Hi,


Well, the generated PDF file by Aspose.Cells would be same as Print Preview of MS Excel, you may confirm in MS Excel. If you need to generate one PDF page per worksheet, please see the document:
http://docs.aspose.com/pages/viewpage.action?pageId=15565485
The document demonstrate the the .NET APIs but you may change to Java code accordingly.

If you still find any issue, kindly attach your "C4stg_test.xls" file here, we will check it soon.

Thank you.

Hi,
Thanks for the reply,its working fine now.

Hi,

Thanks for your input.

It’s good to know that you were able to figure out this issue at your end.

Let us know if you face any other issue relating to Aspose.Cells. We will be glad to assist you further.