We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error Converting from PDF to Excel File - Can't Find File

Hello,


I am trying to convert a pdf file to an excel file using the following code but getting the error: Exception in thread “main” class com.aspose.pdf.internal.ms.System.z72: com.aspose.pdf.internal.ms.System.IO.FileNotFoundException: Can’t find file:
Hoping to get feedback.


Code:

import com.aspose.pdf.Document;
import com.aspose.pdf.ExcelSaveOptions;

public class PDFConversion {

public static void main(String[] args) {
Document pdfDocument = new Document(“IT_IS Org Chart_Nov17_2016.pdf”);
// Instantiate ExcelSave Option object
ExcelSaveOptions excelsave = new ExcelSaveOptions();
// Save the output to XLS format
pdfDocument.save(“ConvertedFile.xls”, excelsave);
}

}

==============
Full error message:
Exception in thread “main” class com.aspose.pdf.internal.ms.System.z72: com.aspose.pdf.internal.ms.System.IO.FileNotFoundException: Can’t find file: IT_IS Org Chart_Nov17_2016.pdf.
File name: 'IT_IS Org Chart_Nov17_2016.pdf’
com.aspose.pdf.internal.p650.z28.(Unknown Source)
com.aspose.pdf.internal.p650.z28.(Unknown Source)
com.aspose.pdf.internal.p110.z17.m2(Unknown Source)
com.aspose.pdf.internal.p110.z17.(Unknown Source)
com.aspose.pdf.internal.p80.z2.m5(Unknown Source)
com.aspose.pdf.internal.p110.z16.(Unknown Source)
com.aspose.pdf.internal.p80.z2.m8(Unknown Source)
com.aspose.pdf.internal.p24.z13.m1(Unknown Source)
com.aspose.pdf.internal.p24.z13.(Unknown Source)
com.aspose.pdf.ADocument.m1(Unknown Source)
com.aspose.pdf.ADocument.(Unknown Source)
com.aspose.pdf.Document.(Unknown Source)
pdfconversion.PDFConversion.main(PDFConversion.java:10) —> com.aspose.pdf.internal.ms.System.IO.FileNotFoundException: Can’t find file: IT_IS Org Chart_Nov17_2016.pdf.
File name: 'IT_IS Org Chart_Nov17_2016.pdf’
com.aspose.pdf.internal.p650.z28.(Unknown Source)
com.aspose.pdf.internal.p650.z28.(Unknown Source)
com.aspose.pdf.internal.p110.z17.m2(Unknown Source)
com.aspose.pdf.internal.p110.z17.(Unknown Source)
com.aspose.pdf.internal.p80.z2.m5(Unknown Source)
com.aspose.pdf.internal.p110.z16.(Unknown Source)
com.aspose.pdf.internal.p80.z2.m8(Unknown Source)
com.aspose.pdf.internal.p24.z13.m1(Unknown Source)
com.aspose.pdf.internal.p24.z13.(Unknown Source)
com.aspose.pdf.ADocument.m1(Unknown Source)
com.aspose.pdf.ADocument.(Unknown Source)
com.aspose.pdf.Document.(Unknown Source)
pdfconversion.PDFConversion.main(PDFConversion.java:10)
— End of inner exception stack trace —
com.aspose.pdf.internal.p110.z17.m2(Unknown Source)
com.aspose.pdf.internal.p110.z17.(Unknown Source)
com.aspose.pdf.internal.p80.z2.m5(Unknown Source)
com.aspose.pdf.internal.p110.z16.(Unknown Source)
com.aspose.pdf.internal.p80.z2.m8(Unknown Source)
com.aspose.pdf.internal.p24.z13.m1(Unknown Source)
com.aspose.pdf.internal.p24.z13.(Unknown Source)
com.aspose.pdf.ADocument.m1(Unknown Source)
com.aspose.pdf.ADocument.(Unknown Source)
com.aspose.pdf.Document.(Unknown Source)
pdfconversion.PDFConversion.main(PDFConversion.java:10)
at com.aspose.pdf.internal.p110.z17.m2(Unknown Source)
at com.aspose.pdf.internal.p110.z17.(Unknown Source)
at com.aspose.pdf.internal.p80.z2.m5(Unknown Source)
at com.aspose.pdf.internal.p110.z16.(Unknown Source)
at com.aspose.pdf.internal.p80.z2.m8(Unknown Source)
at com.aspose.pdf.internal.p24.z13.m1(Unknown Source)
at com.aspose.pdf.internal.p24.z13.(Unknown Source)
at com.aspose.pdf.ADocument.m1(Unknown Source)
at com.aspose.pdf.ADocument.(Unknown Source)
at com.aspose.pdf.Document.(Unknown Source)
at pdfconversion.PDFConversion.main(PDFConversion.java:10)
Caused by: com.aspose.pdf.internal.ms.System.IO.FileNotFoundException: Can’t find file: IT_IS Org Chart_Nov17_2016.pdf.
File name: 'IT_IS Org Chart_Nov17_2016.pdf’
com.aspose.pdf.internal.p650.z28.(Unknown Source)
com.aspose.pdf.internal.p650.z28.(Unknown Source)
com.aspose.pdf.internal.p110.z17.m2(Unknown Source)
com.aspose.pdf.internal.p110.z17.(Unknown Source)
com.aspose.pdf.internal.p80.z2.m5(Unknown Source)
com.aspose.pdf.internal.p110.z16.(Unknown Source)
com.aspose.pdf.internal.p80.z2.m8(Unknown Source)
com.aspose.pdf.internal.p24.z13.m1(Unknown Source)
com.aspose.pdf.internal.p24.z13.(Unknown Source)
com.aspose.pdf.ADocument.m1(Unknown Source)
com.aspose.pdf.ADocument.(Unknown Source)
com.aspose.pdf.Document.(Unknown Source)
pdfconversion.PDFConversion.main(PDFConversion.java:10)
at com.aspose.pdf.internal.p650.z28.(Unknown Source)
at com.aspose.pdf.internal.p650.z28.(Unknown Source)

Hi Sohel,


Thank you for contacting support. This error message occurs when the Aspose API could not find source file at the appropriate physical path. Please make sure that the source file “IT_IS Org Chart_Nov17_2016.pdf” is available in the same directory where Aspose assembly resides or you can give a complete path, e.g. c:\temp\IT_IS Org Chart_Nov17_2016.pdf

Please also make sure that the file extension is PDF. We hope, this helps.