• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

need help with calculation in my spreadsheet array

 
Greenhorn
Posts: 2
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ron Edgerson
Greenhorn
Posts: 2
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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??
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic