ByteScout Spreadsheet SDK - VB.NET - Calculate XIRR Function - ByteScout

ByteScout Spreadsheet SDK – VB.NET – Calculate XIRR Function

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – VB.NET – Calculate XIRR Function

How to calculate XIRR function in VB.NET using ByteScout Spreadsheet SDK

How to calculate XIRR function in VB.NET

The sample source code below will teach you how to calculate XIRR function in VB.NET. Want to calculate XIRR function in your VB.NET app? ByteScout Spreadsheet SDK is designed for it. ByteScout Spreadsheet SDK is the SDK that can write and read, modify and calculate Excel and CSV spreadsheets. Most popular formulas are supported. You may import or export data to and from CSV, XML, JSON as well as to and from databases, arrays.

VB.NET code samples for VB.NET developers help to speed up coding of your application when using ByteScout Spreadsheet SDK. Just copy and paste the code into your VB.NET application’s code and follow the instruction. Enjoy writing a code with ready-to-use sample codes in VB.NET.

Free trial version of ByteScout Spreadsheet SDK is available for download from our website. Get it to try other source code samples for VB.NET.

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

Module1.vb
      
Imports System.IO Imports Bytescout.Spreadsheet Module Module1 Sub Main() ' Create new Spreadsheet Dim document As New Spreadsheet() ' Set locale document.Workbook.Locale = New System.Globalization.CultureInfo("en-US") ' Add new worksheet Dim worksheet As Worksheet = document.Workbook.Worksheets.Add() ' Fill some data worksheet.Cell(1, 1).Value = New DateTime(2008, 1, 1) worksheet.Cell(1, 2).Value = 100 worksheet.Cell(2, 1).Value = New DateTime(2009, 1, 1) 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") Then File.Delete("Output.xls") End If ' Save document document.SaveAs("Output.xls") ' Close Spreadsheet document.Close() ' open generated XLS document in default program Process.Start("Output.xls") End Sub End Module

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

VIDEO

ON-PREMISE VERSION INFORMATION

Get 60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Get ByteScout Spreadsheet SDK Free Training

WEB API

Get Your Free API Key

Explore Web API Documentation

Tutorials:

prev
next