ByteScout Data Extraction Suite - C# - Calculate xirr function with spreadsheet sdk - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Data Extraction Suite – C# – Calculate xirr function with spreadsheet sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Data Extraction Suite – C# – Calculate xirr function with spreadsheet sdk

How to calculate xirr function with spreadsheet sdk in C# and ByteScout Data Extraction Suite

Learn to calculate xirr function with spreadsheet sdk in C#

The sample shows instructions and algorithm of how to calculate xirr function with spreadsheet sdk and how to make it run in your C# application. ByteScout Data Extraction Suite can calculate xirr function with spreadsheet sdk. It can be applied from C#. ByteScout Data Extraction Suite is the bundle that includes three SDK tools for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK.

This prolific sample source code in C# for ByteScout Data Extraction Suite contains various functions and other necessary options you should do calling the API to calculate xirr function with spreadsheet sdk. Follow the instructions from scratch to work and copy the C# code. If you want to use these C# sample examples in one or many applications then they can be used easily.

You can download free trial version of ByteScout Data Extraction Suite from our website to see and try many others source code samples for C#.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Text; using Bytescout.Spreadsheet; namespace CSharp { class Program { static void Main(string[] args) { // Create new Spreadsheet Spreadsheet document = new Spreadsheet(); // Set locale document.Workbook.Locale = new System.Globalization.CultureInfo("en-US"); // Add new worksheet Worksheet worksheet = document.Workbook.Worksheets.Add(); // Fill some data worksheet.Cell(1, 1).Value = new DateTime(2008, 01, 01); worksheet.Cell(1, 2).Value = 100; worksheet.Cell(2, 1).Value = new DateTime(2009, 01, 01); worksheet.Cell(2, 2).Value = -200; // Apply function worksheet.Cell(4, 1).Formula = "=XIRR(C2:C3,B2:B3,0)"; // Read value worksheet.Cell(4, 2).Value = worksheet.Cell(4, 1).Value; // delete output file if exists already if (File.Exists("Output.xls")) { File.Delete("Output.xls"); } // Save document document.SaveAs("Output.xls"); // Close Spreadsheet document.Close(); // open generated XLS document in default program Process.Start("Output.xls"); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next