Results 1 to 19 of 19
Like Tree1Likes
  • 1 Post By JosAH

Thread: XLS to PDF conversion

  1. #1
    nitin2k2k is offline Member
    Join Date
    Dec 2008
    Posts
    1
    Rep Power
    0

    Default XLS to PDF conversion

    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

  2. #2
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    8

    Default Your friend Google

    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
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    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.

  4. #4
    zett is offline Member
    Join Date
    Jan 2009
    Posts
    5
    Rep Power
    0

    Default

    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");

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    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.

  6. #6
    Thennarasu's Avatar
    Thennarasu is offline Member
    Join Date
    Jan 2009
    Location
    Chennai, Tamilnadu
    Posts
    39
    Rep Power
    0

    Default

    From where can i download officetools.jar?
    One Life!!! Y Serious??? :)

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  8. #8
    Thennarasu's Avatar
    Thennarasu is offline Member
    Join Date
    Jan 2009
    Location
    Chennai, Tamilnadu
    Posts
    39
    Rep Power
    0

    Default

    okay thanks
    One Life!!! Y Serious??? :)

  9. #9
    zett is offline Member
    Join Date
    Jan 2009
    Posts
    5
    Rep Power
    0

    Default url

    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.

  10. #10
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  11. #11
    zett is offline Member
    Join Date
    Jan 2009
    Posts
    5
    Rep Power
    0

    Default

    Quote Originally Posted by zett View Post
    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.
    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...

  12. #12
    RocoStar is offline Member
    Join Date
    Feb 2011
    Posts
    3
    Rep Power
    0

    Default

    Nice, exactly what I was looking for.

  13. #13
    Join Date
    Feb 2011
    Posts
    2
    Rep Power
    0

    Default

    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.

  14. #14
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by ultimaterinks2006 View Post
    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.
    It's worth when you want to customize applications.

  15. #15
    Vipinbisen is offline Member
    Join Date
    Sep 2011
    Posts
    3
    Rep Power
    0

    Cool Re: XLS to PDF conversion

    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........

  16. #16
    Vipinbisen is offline Member
    Join Date
    Sep 2011
    Posts
    3
    Rep Power
    0

    Default Re: url

    But in this site they charge for it.
    Is there any free site.........

  17. #17
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  18. #18
    Vipinbisen is offline Member
    Join Date
    Sep 2011
    Posts
    3
    Rep Power
    0

    Lightbulb Re: XLS to PDF conversion

    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............

  19. #19
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,651
    Blog Entries
    7
    Rep Power
    21

    Default Re: XLS to PDF conversion

    Quote Originally Posted by zarfishan View Post
    Something for Java is an online API for java developers to convert Excel file to pdf even if they dont have MS Office installed they can create and convert excel file to pdf using this API.
    I bet it is also soft for your hands; I'm closing this zombie thread.

    Jos
    DarrylBurke likes this.
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Doc to Pdf conversion
    By praveen.kb in forum Advanced Java
    Replies: 2
    Last Post: 01-16-2009, 12:27 PM
  2. String Conversion....
    By hotice1027 in forum New To Java
    Replies: 8
    Last Post: 11-28-2008, 10:52 PM
  3. Word to xml Conversion
    By kushagra in forum Advanced Java
    Replies: 3
    Last Post: 10-16-2008, 08:23 AM
  4. string conversion??
    By j2vdk in forum New To Java
    Replies: 13
    Last Post: 09-19-2008, 03:35 PM
  5. Conversion from wav to vox
    By bozovilla in forum Advanced Java
    Replies: 1
    Last Post: 07-31-2008, 05:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •