NetOfficeFw.VbaCompiler 1.5.1

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package NetOfficeFw.VbaCompiler --version 1.5.1                
NuGet\Install-Package NetOfficeFw.VbaCompiler -Version 1.5.1                
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.5.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NetOfficeFw.VbaCompiler --version 1.5.1                
#r "nuget: NetOfficeFw.VbaCompiler, 1.5.1"                
#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.5.1

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

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

Usage

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";
compiler.AddModule("Module.vb");
compiler.AddClass("MyClass.vb");

// 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);

Requirements

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

Samples

Discover samples in our repository at https://github.com/NetOfficeFw/vbamc/tree/main/sample

Project icon Code is licensed from Icons8 service under Universal Multimedia Licensing Agreement for Icons8.
See https://icons8.com/license 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 was computed.  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 1,004 12/19/2023
1.7.0 475 11/10/2023
1.6.0 489 9/26/2023
1.5.1 146 9/16/2023
1.5.0 156 9/14/2023
1.4.3 391 7/6/2023
1.4.2 234 5/16/2023
1.4.1 174 5/10/2023
1.4.0 301 2/2/2023
1.4.0-preview11 160 2/1/2023
1.4.0-preview10 175 1/28/2023