This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Printing from Excel Sheet  RSS feed

 
Josweth Reddy
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
Joswetha
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!