How does one populate a pre-designed spreadsheet with Java? -
i may going wrong way, here's goal:
i want populate specific fields (that color keyed) in spreadsheet both figures input user , solutions made inputs. spreadsheet not have interactive. essentially, (without being able find solution) trying pass variable specific cell in spreadsheet. achieve access or excel, small part of larger application. if helps, ultimately, user inputs , calcs need stored in database , organized/keyed date; there new inputs , calculations entered daily. here's test program:
/* test program generate spreadsheet , populate specific cells scanner inputs user , solution derived scanner inputs */ import java.util.scanner; class testrecord { string name; double a; double b; double calc_average() { double x = (a+b) / 2; system.out.println("the average " + x); return x; } } class sheetgenerator { public static void main(string[] args) { testrecord dingdong = new testrecord(); double calculatedaverage; scanner in = new scanner(system.in); dingdong.name = "dipity"; system.out.println("enter value numbers " + dingdong.name); system.out.println(); system.out.println("enter value a: "); dingdong.a = in.nextdouble(); system.out.println("enter value b: "); dingdong.b = in.nextdouble(); calculatedaverage = dingdong.calc_average(); } }
i have had lot of success apache poi libraries. easy work , understand.
specific excel , spreadsheets, use hssf & xssf libraries
Comments
Post a Comment