1

Suppose I have a value in an excel cell A5.Let it be 1.3.And then I have cells in the same column below the cell A5 like A6,A7,A8...with some value in it.

Is there any validation method in Java that when I change the value from 1.3 to 1.4 or some other value, all the values in the cells A6,A7,A8 .. gets changed to 1.4 that is becomes equal to A5 ?

Thanks for your answers beforehand.

2
  • 1
    Why would you need JAVA for that? It doesn't seem like there would be a problem to implement this with some simple formulas. Commented Jan 19, 2012 at 20:25
  • @J.Males : I need to generate the excel sheet through java.Well bear me..am new to this.. Commented Jan 19, 2012 at 20:31

1 Answer 1

1

My suggestion would be that you just insert the formulas in the cells through JAVA.

For example, in Excel you want to be a cell the total of two other cells:

C5: =A1+A2

If you for example use the Apache POI, you can use the setCellFormula method.

String formula = "=A1+A2";
cell.setCellFormula(formula);

Here is a little example of how to create the cell objects an how to use the apache POI

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.