View Full Version : Java and Excel

02-12-2007, 10:42 AM
I?m using excel for monte carlo simulations and other intense models, but there is some challenges including it?s slow and the random number generator isn?t so good. My regular java IMSL codes work better but we need this in excel. What?s the best way to integrate excel and imsl for java?

02-12-2007, 11:50 AM

I am not sure what version of Excel you are using, but Excel 2003's bugs in RAND() have been well-documented. Unfortunately I am not much of a Java developer, but I would guess that any solution you explore is going to involve JDBC and things like JExcel. For example, check out this How To:http://www.rgagnon.com/javadetails/java-0516.html

Hopefully another forum member can reply with some real-world experience...

02-13-2007, 03:36 AM

Are you really tied to the Java language?
I am asking this because I think it is easier (and also much more common) to have Excel calling C or C# things (there are a couple of related threads on this forum). Therefore it could be interesting for you to consider whether the IMSL C Numerical Library (http://www.vni.com/products/imsl/c/imslc.html) or the IMSL C# Numerical Library (http://www.vni.com/products/imsl/cSharp/overview.html)...

02-13-2007, 05:42 AM
I'm kind of tied to both excel and java, but we already use jmsl for the maths for the customer web side. But the analysts use excel for all the tables and such but the models are too slow. Nobody knows .net and the jdbc idea sounds possible but isn't that going to be slow too?

02-13-2007, 08:15 AM
We have had some similar requests from customers in the past. In fact we have some code in-house at Visual Numerics that will let you easily call JMSL (or any Java class) from within Excel. Carrying this a step further, the application can also compile Excel spreadsheets into Java bytecode. Our benchmarks show this can run orders of magnitude faster than straight Excel.

This code is not available as a product, but if you (or anyone else) would like some more information, please PM me or post details of your specific requirements.