See the version list below for details.
dotnet add package ExcelFinancialFunctions --version 3.0.0-rc2
NuGet\Install-Package ExcelFinancialFunctions -Version 3.0.0-rc2
<PackageReference Include="ExcelFinancialFunctions" Version="3.0.0-rc2" />
paket add ExcelFinancialFunctions --version 3.0.0-rc2
#r "nuget: ExcelFinancialFunctions, 3.0.0-rc2"
// Install ExcelFinancialFunctions as a Cake Addin #addin nuget:?package=ExcelFinancialFunctions&version=3.0.0-rc2&prerelease // Install ExcelFinancialFunctions as a Cake Tool #tool nuget:?package=ExcelFinancialFunctions&version=3.0.0-rc2&prerelease
Excel Financial Functions
This is a .NET Standard library that provides the full set of financial functions from Excel. The main goal for the library is compatibility with Excel, by providing the same functions, with the same behaviour. Note though that this is not a wrapper over the Excel library; the functions have been re-implemented in managed code so that you do not need to have Excel installed to use this library.
Goal: Match Excel
We replicate the results Excel would produce in every situation, even in cases where we might disagree with Excel's approach. Please have a look at the Compatibility page for more detail on this topic.
Microsoft's official documentation on Excel Functions is the best place to learn more about how the functions should work. The scope for this library is the full set of functions in the "Financial Functions" category.
As of last count, the library is validated against 199,252 test cases.
- ExcelFinancialFunctions.Tests: Unit tests checking against previously-determined truth values from Excel 2010. Inputs and expected outputs are read from data files.
- ExcelFinancialFunctions.ConsoleTests: Test cases comparing the library results directly to running Excel code via interop. These should be run on a Windows machine with Excel 2013 (or later) installed.
You can help!
Adding it to your project
Excel Financial Functions is a .NET Standard 2.0 library, which you can add to any project based on a .NET implementation which supports the standard. This includes .NET Framework 4.6.1 or later, and .NET Core 2.0 or later.
Simply add it from NuGet in the usual way:
PS> dotnet add package ExcelFinancialFunctions Determining projects to restore... info : Adding PackageReference for package 'ExcelFinancialFunctions' into project info : GET https://api.nuget.org/v3/registration5-gz-semver2/excelfinancialfunctions/index.json info : OK https://api.nuget.org/v3/registration5-gz-semver2/excelfinancialfunctions/index.json 69ms info : Restoring packages for project.csproj... info : PackageReference for package 'ExcelFinancialFunctions' version '2.4.1' added to file 'project.csproj'. info : Committing restore... log : Restored project.csproj (in 72 ms).
Even though the libary is written in F#, you can use it from any .NET language, including C#. The functions are provided as static methods on a Financial class in the Excel.FinancialFunctions namespace.
using Excel.FinancialFunctions; Console.WriteLine( Financial.IPmt(rate: 0.005, per: 53, nper: 360, pv: 500000, fv: 0, typ: PaymentDue.EndOfPeriod) ); // Displays -796.3747578439793 Console.WriteLine( Financial.Pmt(rate: 0.005, nper: 360, pv: 500000, fv: 0, typ: PaymentDue.EndOfPeriod) ); // Displays -1687.7136560969248
Or from F#:
open Excel.FinancialFunctions printfn "%f" <| Financial.IPmt (0.005, 53., 180., 200000., 0., PaymentDue.EndOfPeriod) // Displays -796.374758 printfn "%f" <| Financial.Pmt (0.005, 180., 200000., 0., PaymentDue.EndOfPeriod) // Displays -1687.713656
|Product||Versions Compatible and additional computed target framework versions.|
|.NET||net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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.|
|.NET Core||netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed.|
|.NET Standard||netstandard2.0 is compatible. netstandard2.1 was computed.|
|.NET Framework||net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed.|
|MonoAndroid||monoandroid was computed.|
|MonoMac||monomac was computed.|
|MonoTouch||monotouch was computed.|
|Tizen||tizen40 was computed. tizen60 was computed.|
|Xamarin.iOS||xamarinios was computed.|
|Xamarin.Mac||xamarinmac was computed.|
|Xamarin.TVOS||xamarintvos was computed.|
|Xamarin.WatchOS||xamarinwatchos was computed.|
- FSharp.Core (>= 5.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ExcelFinancialFunctions:
Data transformation and Anaytics library - Financial Functions
This package is not used by any popular GitHub repositories.
[Pre-release for testing only]
Retarget library onto .NET Standard 2.0.
- Adds explicit support for .NET Core 2.0 and higher including 5.0 and 6.0
- Removes support for full .NET Framework 4.6 and lower