NetOfficeFw.VbaCompiler
1.4.0
Prefix Reserved
See the version list below for details.
dotnet add package NetOfficeFw.VbaCompiler --version 1.4.0
NuGet\Install-Package NetOfficeFw.VbaCompiler -Version 1.4.0
<PackageReference Include="NetOfficeFw.VbaCompiler" Version="1.4.0" />
paket add NetOfficeFw.VbaCompiler --version 1.4.0
#r "nuget: NetOfficeFw.VbaCompiler, 1.4.0"
// Install NetOfficeFw.VbaCompiler as a Cake Addin #addin nuget:?package=NetOfficeFw.VbaCompiler&version=1.4.0 // Install NetOfficeFw.VbaCompiler as a Cake Tool #tool nuget:?package=NetOfficeFw.VbaCompiler&version=1.4.0
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 | Versions 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. |
-
net6.0
- DocumentFormat.OpenXml (>= 2.18.0)
- NetOfficeFw.VbaCompression (>= 0.3.2)
- OpenMcdf (>= 2.2.1.12)
- System.Collections.Specialized (>= 4.3.0)
-
net7.0
- DocumentFormat.OpenXml (>= 2.18.0)
- NetOfficeFw.VbaCompression (>= 0.3.2)
- OpenMcdf (>= 2.2.1.12)
- System.Collections.Specialized (>= 4.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.