This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
The moose likes Other JSE/JEE APIs and the fly likes Printing from Excel Sheet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Printing from Excel Sheet" Watch "Printing from Excel Sheet" New topic

Printing from Excel Sheet

Josweth Reddy
Ranch Hand

Joined: Nov 02, 2005
Posts: 30
Hi Ranchers,
AS per my requirement I need to print the data from excel sheet using java api (not with AWT and swing).

Thanks &Regards,
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42954
If you don't mind a hackish solution:
  • save the file to be printed to a well-known filename, e.g. "tmp.xls"
  • use the Runtime class to start Excel with a particular file, e.g. "printing.xls"
  • "printing.xls" should contain a macro that opens "tmp.xls" and prints it
  • delete "tmp.xls"

  • Obviously this method has a number of limitations and drawbacks, but it will get the job done.
    I agree. Here's the link:
    subject: Printing from Excel Sheet