• Post Reply Bookmark Topic Watch Topic
  • New Topic

Writing to MS Works Spreadsheet  RSS feed

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm writing a program that produces a lot of data, and I'd like it to be written to MS Spreadsheet (I don't have Excel).

Where can I find documentation / tutorials for doing this (or, if it's really simple, does anyone have code)?

Thanks!
 
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probabaly the easiest way is writing it out to a CSV file. (Just write the values seperated by a comma out to a file)

And I would recommend OpenOffice over Works.
 
Sam Smith
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm, I hadn't realized that OO was available for Windows (I've been using it on my school's unix machines).

With either Works or OpenOffice, is there any code which will allow me to target cells directly? It's a rather messy process writing CSV's that turn into neat spreadsheets.
 
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sam,

Welcome to JavaRanch!

A bit of business: you may not have read our naming policy on the way in. It requires that you use a full, real (sounding) first and last name for your display name. "Handles" and joke names aren't acceptable here. You can change your display name here. Thanks!
 
Steven Bell
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OOo has a developers guide here that should cover working with documents in Java. I've never done it myself.

You could also try poi. It's designed to create/edit MS excel docs. I've heard it's the same engine OOo uses to convert xls docs, but that could just be rumor.
 
Sam Smith
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alright, I'll look through that. Thanks, Steven.

Thanks for the welcome, Ernest, and name changed... though I'm not entirely sure why a false-sounding name such as "Sam Smith" is better than not giving my last name, but no matter.
[ May 31, 2005: Message edited by: Sam Smith ]
 
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a site that offers programming details about different file formats...

http://www.wotsit.org/

I don't know what the MS Works spreadsheet extension is, nor whether it's covered at the above site, but it's definitely worth a look (and a bookmark for future reference).
 
Sam Smith
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like they don't have Works Spreadsheet (.xlr), but thanks for the handy reference. Bookmarked.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It appears that Works Spreadsheet is basically Excel-Light.

According to MS support, "Microsoft Works Spreadsheet files are saved as .xlr files. Files with this extension are in the native Microsoft Excel format." Works Spreadsheet can (supposedly) open any Excel file -- which MS tellingly denotes as .xl* -- although it "opens only one Excel worksheet at a time."

Also, Works Spreadsheet can save as a .csv (comma-delimited text), but apparently can't open from that format.

Refs:
http://support.microsoft.com/?kbid=271074
http://support.microsoft.com/default.aspx?scid=kb;en-us;271080
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!