In this chapter we explain how FCell works in more detail.

FCell XLL Add-In

FCell is installed by running msi package or by activating FCell XLL AddIn (FCell32bit_3_0_0.xll or FCell64bit_3_0_0.xll), found in FCell folder. When active, this XLL AddIn loads FCell Ribbon which gives you access to all FCell features.

FCell allows you to create 2 types of .NET customizations: Excel level customization and workbook level customization.

Excel level customization applies to all open workbooks, whereas workbook level customization is loaded with the workbook and unloaded on workbook close.

Customization assemblies

Customization assembly is any .NET assembly which contains code defining User Defined Functions, Ribbons or Custom Task Panes.

Almost all .NET functions are automatically exposed as UDFs in Excel (see details in the next chapter), no need for special attributes or recompilation. So in practice any .NET assembly can be used as a customization assembly.

An Excel or workbook customization consists of a group of customization assemblies.

You can create customization assemblies in any .NET editor. FCell comes with 3 built-in code editors for F#, C# and VB.NET.

Excel customization

You can create an Excel customization in 3 ways:

  • Add existing customization assemblies via Excel .NET AddIn in FCell Ribbon

    Incl Temp Folder

    If a customization assembly references an assembly not found in GAC, you can add the folder which contains the referenced assembly to .NET Search Folders:

    Search Folders
    Note

    If the referenced assembly is located in the same folder as your customization assembly then you do not need to add the folder to .NET Search Folders as it is searched automatically.

    Note

    Assemblies in .NET Search Folders are loaded with Assembly.LoadFrom(path) into FCell

  • Package existing customization assemblies into a single XLL file as explained in Chapter "Customization Deployment"

  • Create custom AssemblyFeed MEF extension. See Chapter MEF Extensions : Assembly Feed

Workbook customization

You can create a workbook customization in 3 ways:

Note

All 3 ways can be applied to the same workbook

  • Compile source in FCell built-in code editors with Build in FCell Ribbon

  • Embed existing customization assemblies via Doc .NET AddIn in FCell Ribbon

    Workbook Customization
  • Create custom AssemblyFeed MEF extension. See Chapter MEF Extensions : Assembly Feed

If a workbook customization references an assembly not found in GAC, you can embed it as a reference via Doc .NET AddIn

Note

Embedded referenced assemblies are loaded into FCell via Assembly.Load(assemblyBytes : byte[])

Alternatively, you can add the folder which contains your referenced assembly to .NET Search Folders:

Search Folders

You can also specify a source of referenced assemblies in a custom MEF extension, e.g. load from NuGet feed

Workbook customization assemblies can contain public static parameterless methods marked with [XlWorkbookOpen] and [XlWorkbookClose]. These methods will be invoked when workbook opens/closes as well as on each code editor Build.