How To Use In Excel

Many CodeCogs modules can also be used as functions in Excel, via Excel's add-in feature.
An add-in is an extra piece of software which you can quickly 'bolt on' to Microsoft's main program, in order to extend its functionality.
To use a CodeCogs module in Excel, simply download it as an Excel add-in:

1. Check that an Excel add-in is available for the module

Go to the module's documentation page in and inspect its Interface section.
All functions contained in the module will be listed.
If any are available as Excel add-ins, the Excel logo and a brief description will be shown in green:


2. Check that you hold a licence to use the add-in

a) If you can see the Excel logo on the left-hand side of the cart toolbar (in the top right corner of the documentation page) then you're licenced to use the add-in and ready to go.

b) If you can't see the logo on the left, you must purchase a licence for the add-in before proceeding.
Click the button on the far right-hand side to add one to your cart.
All add-ins cost GBP 1.00 each

NB: You must hold a unique licence for each add-in that you want to use.
Add-ins are only available for modules which you have commercially licenced.
If you don't yet own a commercial licence for the module, we will automatically add one to your cart.

3. Download and save the add-in

Once licenced, simply click the Excel logo described in step 2a.
The add-in will download immediately and you'll be prompted for a location to save it on your machine.
It is highly recommended that you use the given filename and save to Excel's dedicated add-ins folder.
This usually somewhere like C:\Documents and Settings\ ... \Application Data\Microsoft\AddIns

4. In Excel, go to Add-Ins

Use the menu Tools > Add-Ins...

5. Inspect the list of available add-ins

A panel will appear, listing all the available add-ins on your machine.

If you have already used the add-in before, it might already be in this list.
If its already there, go straight to step 7.

Otherwise, if you have only just downloaded the add-in, then you'll have to tell Excel where it is.
Click the Browse... button.
6. Browse for the add-in

Navigate to the folder where you saved the add-in, then select it and click 'OK'.

7. Install the add-in

The add-in you downloaded will now appear in the list.

In this example, the file PoissonRandom.xll contained an add-in called Poissonrandom.

Ensure that its box is ticked and click 'OK'.

8. Find the function

The CodeCogs module will now be available as an Excel function.

To use it, you can enter its name and parameter list directly into a cell as you normally would for any built-in function.

However, if you are not yet familiar with the function interface, you can use Excel's helpful "Insert Function" feature.

Use the menu Insert > Function...
or click the main toolbar button which looks like this:

Then select 'CodeCogs' from the category menu:

9. Insert the function

A list, of all the functions in the category 'CodeCogs', will be displayed.

It might only contain a single function, if this is the first CodeCogs add-in installed.
In this example the add-in 319_randomSample contained a single function called cc_discreteSample.

Select the function you want, from the list, and click 'OK'.

Excel will then prompt you for the various inputs that this function requires - this will allow you to complete the function call correctly.



10. A Working Example

Download: example1.zip

To see some add-ins in action, download the zipfile. It contains an Excel spreadsheet, which uses CodeCogs modules as listed in the table below, to solve an event loss problem in Insurance.

Included in the download
are the necessary add-ins (listed in the table below) and also a short paper which gives more information, on the event loss problem and its solution. For more information about the modules, click their names:

CodeCogs Module Excel Add-In Function
stats/dists/discrete/discrete/randomSample cc_discreteSample
stats/dists/discrete/poisson/randomSample cc_poissonSample

The zip file also contains the add-ins, which you must install before viewing the spreadsheet.
Please note that you are not being granted any licences of any kind here.
The add-ins are free to use for the purposes of this demo only.


 
Previous How to Submit Code Tutorial Return to Start