ExcelFinancialFunctions 3.3.0-rc1
dotnet add package ExcelFinancialFunctions --version 3.3.0-rc1
NuGet\Install-Package ExcelFinancialFunctions -Version 3.3.0-rc1
<PackageReference Include="ExcelFinancialFunctions" Version="3.3.0-rc1" />
paket add ExcelFinancialFunctions --version 3.3.0-rc1
#r "nuget: ExcelFinancialFunctions, 3.3.0-rc1"
// Install ExcelFinancialFunctions as a Cake Addin #addin nuget:?package=ExcelFinancialFunctions&version=3.3.0-rc1&prerelease // Install ExcelFinancialFunctions as a Cake Tool #tool nuget:?package=ExcelFinancialFunctions&version=3.3.0-rc1&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.
Thoroughly tested
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!
Found a discrepency? Open an Issue! Or better yet, a Pull Request.
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).
Using it
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: 180, pv: 200000, fv: 0, typ: PaymentDue.EndOfPeriod) );
// Displays -796.3747578439793
Console.WriteLine( Financial.Pmt(rate: 0.005, nper: 180, pv: 200000, 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. 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. |
.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. |
-
.NETStandard 2.0
- FSharp.Core (>= 6.0.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ExcelFinancialFunctions:
Package | Downloads |
---|---|
dexih.functions.financial
Data transformation and Anaytics library - Financial Functions |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.3.0-rc1 | 27,963 | 7/30/2022 |
3.2.0 | 828,079 | 5/11/2022 |
3.1.0 | 110,265 | 12/20/2021 |
3.1.0-rc2 | 986 | 12/20/2021 |
3.0.0 | 7,191 | 12/7/2021 |
3.0.0-rc2 | 1,096 | 12/7/2021 |
3.0.0-rc1 | 1,031 | 12/6/2021 |
2.4.1 | 213,633 | 10/22/2019 |
2.4.0 | 246,415 | 9/5/2016 |
2.3.1 | 11,175 | 3/11/2016 |
2.3.0 | 15,390 | 3/9/2016 |
2.2.0 | 11,511 | 3/25/2014 |
2.1.0 | 3,414 | 1/18/2014 |
This release adds a small improvement: The library is now a strong-named assembly.
* Adds strong name assembly signing. (PR #69)