I'm creating a little program on Eclipse, using Java language in a Maven Project, to convert PDF files into Excel files.
But when I create those files and try to open them, it gives me an error saying that there's an error and it askes me to try to bring back the datas.
When I click "Yes", it generates a blank excel file saying that it had to remove everything in the worksheet.
It gives me a log file but it seems that i can't post urls, so i can't post it in there.
I can't go through this please help me!!!!!
Oh and these are my java method that i use to convert my list of files:
Java method:
private static void conversionPDFtoEXCEL() {
for (int i = 0; i < file.size(); i++) {
File convF = file.get(i);
pdfFileName = convF.getName();
excelFileName = pdfFileName.replaceFirst(".pdf", ".xlsx");
dir = convF.getAbsolutePath().replaceFirst(pdfFileName, "");
PdfDocument pdf = new PdfDocument(dir + pdfFileName);
pdf.loadFromFile(dir + pdfFileName);
System.out.println("Conversione del file .pdf seguente: " + pdfFileName);
pdf.saveToFile(dir + excelFileName, FileFormat.XLSX);
}
}
In my Pom.xml file (that i can't show you cause of the urls) i imported spire.pdf.free 5.1.0 version and javafx 13 correctly.
Before anyone can say that FreeSpire.PDF can't directly convert PDF files to Excel ones, I TRIED IT AT HOME AND IT WORKED, NOW THAT I'M AT MY JOB PLACE IT ISN'T WORKING. (I'm an Italian HighSchooler, sorry if i made some gramatical error or coding errors.)