The sample source codes on this page shows how to set cell formula with spreadsheet sdk in VB.NET. ByteScout Data Extraction Suite is the set that includes 3 SDK products for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK. It can be applied to set cell formula with spreadsheet sdk using VB.NET.
This prolific sample source code in VB.NET for ByteScout Data Extraction Suite contains various functions and other necessary options you should do calling the API to set cell formula with spreadsheet sdk. Simply copy and paste in your VB.NET project or application you and then run your app! Enjoy writing a code with ready-to-use sample VB.NET codes.
Trial version of ByteScout Data Extraction Suite is available for free. Source code samples are included to help you with your VB.NET app.
Imports Bytescout.Spreadsheet Imports System.IO Module Module1 Sub Main() ' Create new Spreadsheet Dim document As New Spreadsheet() ' add new worksheet Dim Sheet As Worksheet = document.Workbook.Worksheets.Add("FormulaDemo") ' headers to indicate purpose of the column Sheet.Cell("A1").Value = "Formula (as text)" ' set A column width Sheet.Columns(0).Width = 250 Sheet.Cell("B1").Value = "Formula (calculated)" ' set B column width Sheet.Columns(1).Width = 250 ' write formula as text Sheet.Cell("A2").Value = "7*3+2" ' write formula as formula Sheet.Cell("B2").Value = "=7*3+2" ' remove output file if already exists If File.Exists("Output.xls") Then File.Delete("Output.xls") End If ' Save document document.SaveAs("Output.xls") ' Close Spreadsheet document.Close() ' open in default spreadsheets viewer/editor Process.Start("Output.xls") End Sub End Module