Hi,
I have an MS-EXCEL file. I want to convert it into PDF file.
Please help me. Is there any java API available for the same?
Regards
Nitin
Printable View
Hi,
I have an MS-EXCEL file. I want to convert it into PDF file.
Please help me. Is there any java API available for the same?
Regards
Nitin
Just Google "excel to pdf" ... plenty of options. As for a Java API that does this directly, I don't know of any (I'm sure there isn't anything). What you can do is execute the application that does the convertion from a Java program.
Luck,
CJSL
Nitin, please don't post the same question multiple times in the forum. That's not good. Please read our FAQ page before posting again. Select the correct sub-forum next time before posting your question.
import officetools.OfficeFile;
...
FileInputStream fis = new FileInputStream(new File("test.xls"));
FileOutputStream fos = new FileOutputStream(new File("test.pdf"));
OfficeFile f = new OfficeFile(fis,"localhost","8100", true);
f.convert(fos,"pdf");
This is not a standard API in JDK. So better to send any download link or something here, it can be really helpful to all members who are looking at your replay zett.
From where can i download officetools.jar?
Search on the Google. Or else you have to wait until zett commenting on my previous post.
okay thanks
This guy is providing it on its page: dancrintea.ro/html-to-pdf/
check middle page at the section "HTML to PDF with Java".
A team in my company has used it for a project.
That's pretty cool.
In fact the real url is this one: dancrintea.ro/xls-to-pdf/
Besides converting XLS to PDF it is also possible to:
- convert DOC+PPT to PDF
- replace strings in DOC files
- read/write Excel files using simplified aAPI like getCell and setCell
- hide sheets in Excel files(hide secondary calculations for example)
The only downside is that it needs OpenOffice,
but hey..... a lot of nice things things are possible this way, so...
Nice, exactly what I was looking for.
open office has an option to save any file as pdf.We can use it for writing bulk operation code but for single file i don't think its worth writing.
Is there any free site to get Officetools.jar........
I went to suggested site i.e. 4shared.com, but it has Office Tools which is something else...
Please help........
But in this site they charge for it.
Is there any free site.........
Did you search on Google?
Yes.......I did searching everywhere............
Now I am trying it manually..........
I am using apache POI API to read excel file and iText API to write contents to pdf file......
But problem here is that the exact formatting of excel file is not coming in pdf file.........
Please suggest if you have any better ideas............:(nerd):