excel - Using XLLoop for java -


xlloop opensource framework java. example can use function java in excel. below simple example of usage:

package org.boris.xlloop.util;  import org.boris.xlloop.functionserver; import org.boris.xlloop.handler.*; import org.boris.xlloop.reflect.*;  public class serverexample {     public static void main(string[] args) throws exception {         // create function server on default port         functionserver fs = new functionserver();          // create reflection function handler , add math methods         reflectfunctionhandler rfh = new reflectfunctionhandler();         rfh.addmethods("math.", math.class);         rfh.addmethods("math.", maths.class);         rfh.addmethods("csv.", csv.class);         rfh.addmethods("reflect.", reflect.class);          // create function information handler register our functions         functioninformationhandler firh = new functioninformationhandler();         firh.add(rfh.getfunctions());          // set handlers         compositefunctionhandler cfh = new compositefunctionhandler();         cfh.add(rfh);         cfh.add(firh);         fs.setfunctionhandler(new debugfunctionhandler(cfh));          // run engine         system.out.println("listening on port " + fs.getport() + "...");         fs.run();     } } 

i understand , programm working. if go excel, isn't working. try:

=fs("math.random") =math.random() 

but got #name? twice

so suppose should make yet. tell me step step how configure excel , java this? should xlloop-0.3.2 (microsoft excel xll add-in) file ?

i tried running code , got following output.

enter image description here

all had launch excel , add xlloop addin.

  • list item. press alt+g or click on go button beside manage excel add-ins.
  • list item. click on browse , provide path xlloop-0.3.2.xll file. if had downloaded xlloop-0.3.2.zip,extract , find inside /xlloop/bin
  • list item

hope helps.

edit:

  • launch excel.

  • start server(run main class) , test formulas.

i tested following 2(typed them on excel formula bar , hit/press enter) , worked fine. :)

  1. =fs("math.sin", 3.14)
  2. =fs("math.random")

enter image description here enter image description here


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -