Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented initial minimal support for native Excel add-ins #745

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

Sergey-Vlasov
Copy link
Contributor

Running MasterBuild\MasterBuild.cmd produces Package\nupkg\ExcelDna.AddIn.NativeAOT.0.1.0.nupkg.

Publishing the following C# project produces native 64-bit MyAddin.xll Excel add-in.

MyAddin.csproj:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net8.0-windows</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>

    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
    <PublishAOT>true</PublishAOT>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="ExcelDna.AddIn.NativeAOT" Version="0.1.0" />
  </ItemGroup>

</Project>

Functions.cs:

using ExcelDna.Integration;

namespace MyAddin
{
    public class Functions
    {
        [ExcelFunction]
        public static string MyHello(string name)
        {
            return $"Hello {name}!";
        }

        [ExcelFunction]
        public static int MySum(int i1, int i2)
        {
            return i1 + i2;
        }
    }
}

@Sergey-Vlasov Sergey-Vlasov requested a review from govert February 2, 2025 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant