wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes need help with calculation in my spreadsheet array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "need help with calculation in my spreadsheet array" Watch "need help with calculation in my spreadsheet array" New topic
Author

need help with calculation in my spreadsheet array

Ron Edgerson
Greenhorn

Joined: Mar 22, 2011
Posts: 2

im currently making a spreadsheet that calculate user input and puts the row, column,values,total in the spreadsheet and im trying to store the formula in the cell but im having problems doing so can some one help me out??

heres my code:
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14433
    
  23

Welcome to the Ranch!

Can you explain in more detail what aspect of it you exactly have problems with? Do you get any error messages; if yes, then what exactly are the error messages? Does the program run, but doesn't it do what you expect - if yes, then how does what it actually does differ from what you expect?

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Ron Edgerson
Greenhorn

Joined: Mar 22, 2011
Posts: 2

Ok so if does give me a error yet, nonetheless, here is my output:

Enter the Cell Column, Row, and Value:
a 0 3.4 b 0 3.4 + c 0
3.4 + 3.4 = 6.8

A B C D E F G
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
0 | 3.400 | 3.400 | 6.800 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
1 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
2 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
3 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
4 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
Enter to change the row and col:
A 0 2.333
2.333 + 3.4 = 5.7330000000000005

A B C D E F G
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
0 | 2.333 | 3.400 | 6.800 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
1 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
2 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
3 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|
4 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ---------| ---------| ---------| ---------| ---------| ---------| ---------|


Now i ask the user to input column, row number, value, and then column two, row number 2, value two, operator, and then store the total in the cell specified. which it does store the correct total in the first prompt, but when i ask the user to change the value in column A , row 0 , the new value is store but the total will not change ( which it suppose to change from 6.8 to 5.7).
im not sure how to get the new total to store??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need help with calculation in my spreadsheet array