Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jxl

Status
Not open for further replies.

keenanbr

Programmer
Oct 3, 2001
469
IE
I don't think this is possible but thought I'd ask. A cell's value is calculated based on a formula e.g. A2=A1*3. Change A1 value

Code:
Number number = new Number(0,0,6); //set A1 to 6
workSheet.addCell(number);

System.out.println(workSheet.getCell(0,1).getContents()));

expect output to be 18

 
Have a look at Apache POI, that supports both .xls and .xlsx Excel formats, but also evaluation of most of the Excel functions (but not user-defined-functions)

Grab the latest beta (3.8 beta 4) for testing/trying, it's feature rich, quite stable, and will be released quite soon.

POI is a little less simple to get implemented then jxl (it has several jars that need to be on the classpath) but it's much more powerful, and actually future-safe, as it's being actively developed, and also supports Office 2007/2010 file formats.
 
Thanks, I have downloaded it but haven't had a chance to try it yet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top