• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Exporting from Java to MS Word and MS Excel  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! Is it possible to export data from a Java application to MS Word and MS Excel? If it's possible, how do you do it? We are currently working on a project that uses Java and our application needs to generate reports in MS Word aand MS Excel. Unfortunately, I am completely clueless how to go about this report generation thing. Could anyone please help me? Do you know of any sites where I can get specific information on how to export data from java to MS Word and Excel? Thanks so much.
 
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest way to do this for Excel is to output your data as comma-separated values, and pop a .csv on the end of the file name. Excel recognizes this format and will tabularize it for you, but be careful about fields with internal whitespace -- Excel may not handle those as you'd expect.
I'm not sure what you mean by Word format. Do you also want a table for that?
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I may be crazy, but I remember reading that MS Word actually uses XML for formatting it's documents. I'll try to track down the source, but if someone else has heard of such a thing, back me up.

------------------
WebNelly.com
Java/XML Web Development
Check it out!
http://www.webnelly.com
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Word can open a .htm or .html file so you could create/format your report with standard html tags.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!