Great Idea From JavaTools Community Newsletter
https://javatools.dev.java.net/newsletter/20061101.html
Excel Formula is one of the key component leads to the success of MS EXCEL. The easy to use, develop and learn properties
make it essential in office operation.
This project aimed to provide excel-formula-like operations on Java's arrays, collections and database to greatly simplify
the related operations. Programmers with excel formula can use their existing skills on java desktop and web programming.
This library also acts as a collection of utility classes for common operations. This reduces a lot of boilerplates and
programmers!| effort to write these operations again.
This project is targeted to Java Platform Version 5.0 with Apache License 2.0, since the introduction of Annotation and
Generic can help us to build a more powerful and flexible library. However, a back-port to 1.4 is under consideration to help
these still using it.
Scenario:
In Excel: Sum up first 24, 25 and 26 columns of A, C and E rows respectively.
equivalent to
In Java: Sum up the first 24, 25, 26 columns of 0, 2 and 4 rows in a 2D array respectively.
In VBA/Excel:
dim value =average(A1:A24, C1:C25, D1:D26)
Java without jexcelforumla:
double result = 0d;
int count = 0;
int[][] table = { ......};
for(int i=0; i
++count;
result += table[0][i]);
}
for(int i=0; i
++count;
result += table[2][i]);
}
for(int i=0; i
++count;
result += table[4][i]);
}
result/=count;
Java Using jexcelforumla:
static import jexcelforumla.Statistic.*;
...
int[][] table = { ......};
double result = average(range("A1:A24", table), range("C1:C25", table), range("D1:D26",table));
------or------
double result = average(range(0, 0, 23, table), range(2, 0, 24, table), range(4, 0, 25, table));
Participation
Serious Programmers familiar with Excel Formula and Java are welcome!!!!