Using StatistiXL in VBA

Is it possible to invoke StatistiXL functions in an Excel macro, in VBA?


  • Yes and No smile.gif . Most of the statistiXL number crunching is performed in a bunch of DLLs. You can see these in your statistiXL program directory. They all start with the prefix SXL and the rest of the name typically describes the module they relate to (eg SXLPCA.dll for Principal Component Analysis). A final DLL, SXLMain.dll contains a bunch of generic routines used by all of the other DLLs.

    The yes part of my answer is as follows. You can code against the DLLs by simply adding references to them for your VBA project (Tools/References within the Excel VBA editor). You can add references to all 12 DLLs or to just SXLMain and whatever specific module you are interested in.

    The no part of my answer is for 2 reasons. 1) There is no documentation for the DLLs. Basically you are on your own in trying to code against them. That said, you can obviously browse the structure of the DLLs in Object Browser to see what properties and methods they expose. Most should be pretty self-explanatory and easily matched up against the options available in the modules dialog box within the Excel based statistiXL front end. 2) the DLLs simply return an Excel range that can then be pasted onto a spreadsheet. This is a pre-formatted range that contains the output just as it would be displayed at the end of an analysis using statistiXL. This may be fine for your needs but if you are wanting to pull out individual values (eg the F value of an ANOVA etc) you will have to perform the entire analysis and parse the values that you require from the returned range.

    Feel free to play if these requirements meet your needs.

  • Thanks for the reply. The Object Browser you refer to, is that also in VBA?
  • Yes, press F2
Sign In or Register to comment.