NetOfficeFw.VbaCompiler 1.8.0

Prefix Reserved
dotnet add package NetOfficeFw.VbaCompiler --version 1.8.0                
NuGet\Install-Package NetOfficeFw.VbaCompiler -Version 1.8.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NetOfficeFw.VbaCompiler" Version="1.8.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NetOfficeFw.VbaCompiler --version 1.8.0                
#r "nuget: NetOfficeFw.VbaCompiler, 1.8.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NetOfficeFw.VbaCompiler as a Cake Addin
#addin nuget:?package=NetOfficeFw.VbaCompiler&version=1.8.0

// Install NetOfficeFw.VbaCompiler as a Cake Tool
#tool nuget:?package=NetOfficeFw.VbaCompiler&version=1.8.0                

Library VbaCompiler compiles Visual Basic source code and Ribbon customizations to Microsoft Office macro enabled files.


Sample usage to generate Excel workbook file with macro from the source code files Module.vb and MyClass.vb:

using DocumentFormat.OpenXml.Packaging;

var compiler = new VbaCompiler();
compiler.ProjectId = Guid.NewGuid();
compiler.ProjectName = "My Macro Project";
compiler.CompanyName = "ACME";

// generate the vbaProject.bin file
var vbaProjectPath = compiler.CompileVbaProject("obj", "vbaProject.bin");

// generate Excel macro file
var macroFilePath = compiler.CompileExcelMacroFile("bin", "MyMacro.xlsm", vbaProjectPath, SpreadsheetDocumentType.MacroEnabledWorkbook);


The compiler works on .NET 6, 7 and 8 runtimes on Windows and macOS.


Discover samples in our repository at

Project icon Code is licensed from Icons8 service under Universal Multimedia Licensing Agreement for Icons8.
See for more information

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.8.0 753 12/19/2023
1.7.0 450 11/10/2023
1.6.0 475 9/26/2023
1.5.1 129 9/16/2023
1.5.0 137 9/14/2023
1.4.3 370 7/6/2023
1.4.2 197 5/16/2023
1.4.1 166 5/10/2023
1.4.0 289 2/2/2023
1.4.0-preview11 139 2/1/2023
1.4.0-preview10 151 1/28/2023