ByteScout simple and easy to understand tutorials are planned to describe the code for both VB.NET beginners and advanced programmers. ByteScout Barcode Suite: the set that includes three different SDK products to generate barcodes, read barcodes and read and write spreadsheets: Barcode SDK, Barcode Reader SDK and Spreadsheet SDK. It can set cell formula with spreadsheet sdk in VB.NET.
This prolific sample source code in VB.NET for ByteScout Barcode Suite contains various functions and other necessary options you should do calling the API to set cell formula with spreadsheet sdk. IF you want to implement the functionality, just copy and paste this code for VB.NET below into your code editor with your app, compile and run your application. Complete and detailed tutorials and documentation are available along with installed ByteScout Barcode Suite if you’d like to learn more about the topic and the details of the API.
ByteScout Barcode Suite free trial version is available on our website. VB.NET and other programming languages are supported.
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