Rectangle 27 0

How to print excel file and word document in java?


Hello Sameer! My requirement is to print a Text file, PDF file, Excel file and Word Doc file to specific printer. I was successful writing Text file and PDF. but am unable to get Excel and word doc. so i asked for help..

i guess you can try this. It is a duplicate question i guess. try this link it has the answer for your question Print text File to specific printer in java

you can get help from this forum dicussion

Note
Rectangle 27 0

How to print excel file and word document in java?


Apache POI is Open-Source. If you want to do it yourself, go read the Microsoft documentation on how to parse a spreadsheet(Beware, it's not as much fun as you might think).

Apache POI is one of the more useful libraries for doing MS Word on java.

Our requirement is we can't use third party tools or jar files which we have to buy. They suggested me to complete the requirement by using open source jar files and by using java. No office org tools, etc; So i specifically asked the source code. If not you help me to reach my requirement by providing required information. Do that favour.It will be helpful for me.

Note
Rectangle 27 0

How to print excel file and word document in java?


+1 for educating on SO usage and helping rather than instantly voting down.

Another way is to use the Apache POI, as indicated by Nicholas. But POI also have some problem render Office documents. The positive sides is that it can be stable compared with calling .NET

Anyway it is not a good way to print Microsoft things from Java, same applies to print PDF documents from .NET or other Microsoft things. Sigh!

For printing Office documents from java, One way is to call .NET from java, but this one is very slow and if you want to integrate the source code, you need a bridge. If you want to write serious projects, this method seems too weak.

For the java desktop way, seeing from java API, it seems to leave the solution to your OS. I am not sure about it. You can try it.

I found that if you seeking for source code, surely someone would vote you down. What you need should be an idea, or some hint to the solution only.

To print PDF document, you can utilize the Sun PDF Renderer library, it is quite good. For text document print, it is quite simple with Java API, such as DocPrintJob or PrinterJob.

Note
Rectangle 27 0

How to print excel file and word document in java?


Desktop.getDesktop().print(new File("resume.doc"));

Sorry Andrew.. I didnt get u.. can u please elaborate it.

Note
Rectangle 27 0

How to print excel file and word document in java?


Desktop.getDesktop().print(new File("resume.doc"));

Sorry Andrew.. I didnt get u.. can u please elaborate it.

Note
Rectangle 27 0

How to print excel file and word document in java?


+1 for educating on SO usage and helping rather than instantly voting down.

Another way is to use the Apache POI, as indicated by Nicholas. But POI also have some problem render Office documents. The positive sides is that it can be stable compared with calling .NET

Anyway it is not a good way to print Microsoft things from Java, same applies to print PDF documents from .NET or other Microsoft things. Sigh!

For printing Office documents from java, One way is to call .NET from java, but this one is very slow and if you want to integrate the source code, you need a bridge. If you want to write serious projects, this method seems too weak.

For the java desktop way, seeing from java API, it seems to leave the solution to your OS. I am not sure about it. You can try it.

I found that if you seeking for source code, surely someone would vote you down. What you need should be an idea, or some hint to the solution only.

To print PDF document, you can utilize the Sun PDF Renderer library, it is quite good. For text document print, it is quite simple with Java API, such as DocPrintJob or PrinterJob.

Note
Rectangle 27 0

How to print excel file and word document in java?


Apache POI is Open-Source. If you want to do it yourself, go read the Microsoft documentation on how to parse a spreadsheet(Beware, it's not as much fun as you might think).

Apache POI is one of the more useful libraries for doing MS Word on java.

Our requirement is we can't use third party tools or jar files which we have to buy. They suggested me to complete the requirement by using open source jar files and by using java. No office org tools, etc; So i specifically asked the source code. If not you help me to reach my requirement by providing required information. Do that favour.It will be helpful for me.

Note
Rectangle 27 0

How to print excel file and word document in java?


Hello Sameer! My requirement is to print a Text file, PDF file, Excel file and Word Doc file to specific printer. I was successful writing Text file and PDF. but am unable to get Excel and word doc. so i asked for help..

i guess you can try this. It is a duplicate question i guess. try this link it has the answer for your question Print text File to specific printer in java

you can get help from this forum dicussion

Note