NAG and Microsoft Excel - Expand your capabilities

Quick Links - NAG and Excel

Learn how to maximize Excel's potential with the NAG Library.

One of the major benefits of the NAG Library is its inherent flexibility; it can be used by programmers developing in traditional languages, or by users of modern software packages and programming environments, like Microsoft Excel.

To make using the NAG Library easy, we provide the Library as a Dynamic Link Library (DLL). Despite the relatively simple methods of linking to the Library from Excel, it's important to note that to gain benefit from NAG routines in this manner you'll need to be capable of programming in either Microsoft Visual Basic for Applications (VBA) or Visual Studio for Office (VSTO).

The 'NAG and Microsoft Excel' area of the NAG website has been created as a central repository for those wishing to either:
 

Interactive demonstrations showing the use of NAG routines in Excel

These demos highlight the ease with which Excel-based applications that utilize routines from the NAG Library may be developed. Examples are presented for beginner programmers, and for those that are more experienced.

Basic examples:

Advanced examples:

NAG Statistical Add-Ins for Excel

The NAG Statistical Add-Ins contain a considerable number of statistical routines grouped together in one spreadsheet. These include functions for:

  • Simple statistics
  • Regression analysis
  • Time series modelling
  • GLMs
  • PCA
  • Factor, Cluster, and Discriminant Analyses
  • Non parametric tests
  • And others…

All functions can be called via Excel's function wizard and the spreadsheet is supplied with a NAG menu with utilities for expanding the results and extracting formatted data.

The spreadsheet works with the 32-bit NAG Fortran Library FLDLL234ML with Excel 2003, 2007, and 2010 (32-bit).

The zip file contains the Excel spreadsheet, a Readme file and Windows help file.

If you wish to use the Add-Ins in 64-bit Excel 2010 please contact sales@nag.co.uk.

NAG Survival Analysis for Excel

The NAG Survival Analysis spreadsheet contains functions to:

  • Compute Kaplan-Meier estimates of survival probabilities (with plots)
  • Compute rank statistics for comparing survival curves
  • Fit Cox's proportional hazard model

All functions can be called via Excel's function wizard and the spreadsheet is supplied with a NAG menu with utilities for expanding the results and extracting formatted data.

The spreadsheet works with the 32-bit NAG Fortran Library FLDLL234ML with Excel 2003, 2007, and 2010 (32-bit).

The zip file contains the Excel spreadsheet and a Readme file.

If you wish to use the Add-Ins in 64-bit Excel 2010 please contact sales@nag.co.uk.

 


 

If you wish to use any of these examples you need to have the appropriate NAG Library installed. All examples are 32/64 bit compatible. The table below shows NAG Product codes depending on which version of Excel and which type of NAG Library you use.


  NAG Fortran Library for Windows NAG C Library for Windows
32-bit Excel FLDLL234ML CLW3223DAL
64-bit Excel FLW6I23DCL CLW6I23DAL

To access a trial of these libraries please go to our download page. To run the demonstrations effectively you must have macros enabled in Excel. We suggest you save the file (using right click 'Save As') and then open from the saved location. Before you run a demonstration please refer to the Help and Information buttons within the Excel workbook, where available.The examples are supplied with the appropriate VB headers. If you would like to call other routines from the NAG Library, please download the headers via the hyperlinks listed at the bottom of this page (where applicable, otherwise please contact support).

Additional examples of calling NAG routines from Excel are available for most of the above libraries. For the C Library, these examples are available for download for both CLW3223DAL and CLW6I23DAL. For FLDLL234ML and FLW6I23DCL, once the library has been downloaded and installed, the examples can be found in the Samples/Excel_Examples subdirectory of the library installation directory.

Recorded web demonstrations highlighting NAG in Excel functions show the ease of application development

  • Portfolio Optimization Example (using the NAG library from Excel)
  • Option Pricing Example (using the NAG library from Excel)

Please click here to view recorded webinar clips highlighting NAG in Excel functions.

Using the NAG Library for .NET in Excel (NEW EXAMPLE)

This archive contains a demo which uses methods from the NAG Library for .NET in an Excel spreadsheet to fit a bicubic spline surface to a set of points in 3D space. More information about the demo can be found in this README (a copy of which is also contained in the archive).

White Paper/Technical Reports

NAG experts and collaborators working at other organisations and learning institutions have written papers and reports about using NAG routines in Excel. Links to various reports are featured below.

Header files for the NAG Libraries

Visual Basic NAG header files (for use in VBA)

Visual Basic .NET NAG header files (for use in VSTO)

Not found what you're looking for?

If you'd like to talk to us about your requirements for mathematical and statistical functionality to enhance your use of programming using Excel either email us at nagmarketing@nag.co.uk or call us directly.

Website Feedback

If you would like to see any changes on the current page, feel free to leave us a message.

(If you're a human, don't change the following field)
Your first name.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.