-   Forums
     -   Articles and Whitepapers
     -   Downloads
     -   Courses and Events
     -   Course Registration
     -   Distance learning
     -   Courses for Universities
     -   Books
     -   Audios and Demos
     -   Testimonials

Share this page:  Tweet


Creating Add-in Excel Applications using C++ and C#; Interoperability Software Tools and Applications - (code EXCEL)

The goal of this three-day course is to apply C++ and C# to help in the creation of Automation and COM add-ins for Excel and to show how to develop worksheet functions and Excel-based applications in computational finance. We introduce and elaborate the tools, libraries and language features that are needed to create efficient and robust add-ins. In addition, we achieve a high level of interoperability between C++, C# and VBA.

Overview of Course
This course discusses in detail everything that is needed in order to create Excel add-in applications. In particular, we discuss the following ‘A to Z’ topics:
  • Creating User-Defined Functions (UDF) and worksheet functions in C++ and C#
  • COM add-ins in C+ and C#
  • Calling add-ins from VBA and multi-language support
  • Creating, registering, deploying and maintaining add-ins
  • Improving the performance of your add-ins
  • XML, DDE and RTDServer interfacing
 
What do you learn?
This hands-on and practical course discusses all that is needed to understand, create, debug and deploy Excel Add-ins using C++ and C# (and the ability to use these add-ins from VBA, for example).

Course Contents

Part 1: Fundamentals and Background
COM Essentials
  • Interfaces and IUnknown
  • Class identifier (CLSID)
  • Guid and ProgID attributes
  • The Registry and programmable registry sub-key 
Active Template Library (ATL) Essentials
  • How ATL simplifies COM programming
  • ATL objects and servers
  • Creating ATL projects in Visual Studio
  • Creating ATL projects for COM Add-in
  • Implementing IDTExtensibility2 interface
C++/CLI Language
  • Managed versus unmanaged C++
  • Managed C++ basics
  • Collections
  • How to interface unmanaged C++ with C++/CLI
The IDTExtensibility2 Interface
  • OnConnection() and OnDisConnection() methods
  • Applications of IDExtensibility2 to creation of add-ins
Excel Object Model
  • Excel COM Automation objects
  • Collections, books, sheets, ranges, cells, charts
  • Chart Wizard
  • Connecting to the Excel application
Assemblies in .NET
  • Assemblies compared to native DLLs
  • Assembly structure
  • The Assembly class and assembly strong name
  • Global Assembly Cache (GAC)
  • Resource and satellite assemblies


Part 2: Automation Add-ins

Introduction to Automation

  • Automation servers and clients
  • Dispinterfaces and IDispatch
  • ClassInterface attribute
  • AutoDispatch and AutoDual
  • User-defined functions (UDF)
Creating Automation Add-ins in C#
  • Guid, ProgId, ClassInterface
  • Referencing the Excel Application
  • Registering COM components
  • Loading and using Automation Add-ins
  • Versioning
  • Volatile Cells
Automation Add-ins: Functionality and Languages
  • Creating Automation add-ins in C+
  • Using add-ins from VBA
  • Importing type libraries
  • Working with ranges
  • Functions with optional parameters
  • Early and late binding
Automation Add-ins: Examples
  • Simple Calculator
  • Linear and cubic spline interpolators
  • Interest rate pricers
  • Documenting the add-in
 
Part 3: COM Add-ins
Background
  • ATL projects with IDTExtensibility2 support
  • Managed and unmanaged add-ins
  • VS add-ins and shared add-ins
  • Differences between C# and C++ add-in implementations
  • Shared Add-in Wizard
  • Extendibility projects
COM Add-ins in C# and C++
  • Implementing the IDTExtensibility2 interface
  • COM add-in and the Registry: loading options
  • Adding a menu item to the add-in
  • Menu item event handler
  • Using COM add-ins


Part 4: Mixed-Language Development

Mixed C#/C++ Add-ins

  • Using C# for add-in, unmanaged C++ for computation
  • C++/CLI wrappers for C++
  • Data interoperability
  • Example: option pricing
  • Which language choice is best?
  • When to chose which mode
Using Legacy DLLs
  • Calling DLL functions using PInvoke
  • DllImport attribute
  • Callback functions
  • Security settings
 Using COM Components in .NET
  • .NET wrapper classes
  • Runtime Callable Wrapper (RCW)
  • Error handling
  • Using ActiveX controls
  • Primary Interop Assemblies (PIA)
Using .NET Components from non .NET Clients
  • COM Callable Wrapper (CCW)
  • Registering .NET Components
  • Example: Calculator
  • Early binding
  • Creating and importing Type Library
  • Versioning
 Unmanaged C++ from C#
  • Using C++ directly in .NET
  • Wrapping C++ in C++/CLI
  • Exposing Native C++ classes
  • Handling strings
  • Using the wrapper from C#
Calling C# from Unmanaged C++
  • Selective use of .NET functionality
  • Creating C++/CLI projects
  • Example: Calculator with GUI in WinForms
  • Advantages of C++/CLI
XLL-Based Worksheet Functions
  • Overview of XLL
  • Function table
  • DLLMain function and DLL Callback functions
  • XLOPER and OPER Data Types; Excel4 function
  • Memory management
  • Registering and unregistering worksheet functions
  • Creating XLL projects in Visual Studio


Part 5: Applications, Performance and Interoperability

RTDServer in C# and C++
  • RTD function
  • RTD server and client
  • Topic data class
  • IRtdServer interface and its methods
  • Implementing an RTD server
  • Example: simulating data feeds
Migrating/Replacing Excel VBA Applications
  • Determining performance bottlenecks
  • Migrating VBA code to C#
  • Using VBA dialog boxes and XLA files
  • Calling add-ins from VBA
  • Measuring performance
XML and Excel Integration
  • XML features
  • XSD files; XML maps
  • Importing and exporting XML data
  • MSXML parser
Performance Improvement and Multi-threading
  • Reducing latency: combining worksheet functions
  • C++ libraries: OpenMP and Boost Thread
  • C# threads and TPL (Task Parallel Library)
  • Example: Two-factor PDE addin
Testing and Debugging your Software
  • C# Debug and Trace classes
  • TraceListener
  • Debugger integration
  • StackTrace and StackFrame
Deployment
  • Setup projects
  • Distribution of add-ins
  • Version control

Part 6: Additional Technologies

Serialization

  • Serialization concepts
  • Formatters
  • Binary, data contract and XML serializers
LINQ
  • LINQ overview
  • LINQ queries
  • LINQ to objects
  • Filtering, ordering, grouping
LINQ applications
  • LINQ and XML
  • LINQ and databases
  • LINQ and Excel
  • Parallel LINQ (PLINQ)

Prerequisites

Experience of the Excel development environment using VBA, for example. Knowledge of programming in an object-oriented language is also useful, although not strictly necessary. It is also advantageous if you know how the Visual Studio IDE works.

Who should attend?

Quant developers, analysts and traders who develop Excel add-ins (in VBA, for example) and who wish to benefit from the many advantages of the .NET framework in order to create high-performance computational finance Excel-based applications in C++ and C#.
This course is also useful for IT personnel who work in a finance environment.

Duration, price, date, locations and registration

Course duration: 3 days.
Course price: € 2475.-- ex. VAT.
€ 2994.75 inc. 21% VAT.
Dates and location: (click on dates to print registration form)


Date(s) Location Price Language
No dates yet.

This course can be organised on-demand. Call Datasim (+31-72-2204802) or for more information about the possibilities.



Share this page:  Tweet