ByteScout Data Extraction Suite - C# - Set cell formula with spreadsheet sdk - ByteScout

ByteScout Data Extraction Suite – C# – Set cell formula with spreadsheet sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Data Extraction Suite – C# – Set cell formula with spreadsheet sdk

How to set cell formula with spreadsheet sdk in C# and ByteScout Data Extraction Suite

Continuous learning is a crucial part of computer science and this tutorial shows how to set cell formula with spreadsheet sdk in C#

Source code documentation samples give simple and easy method to install a needed feature into your application. What is ByteScout Data Extraction Suite? It 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 help you to set cell formula with spreadsheet sdk in your C# application.

Want to quickly learn? This fast application programming interfaces of ByteScout Data Extraction Suite for C# plus the guidelines and the code below will help you quickly learn how to set cell formula with spreadsheet sdk. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Want to see how it works with your data then code testing will allow the function to be tested and work properly.

Our website gives trial version of ByteScout Data Extraction Suite for free. It also includes documentation and source code samples.

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.Text; using Bytescout.Spreadsheet; using System.Diagnostics; using System.IO; namespace HelloWorld { class Program { static void Main(string[] args) { // Create new Spreadsheet Spreadsheet document = new Spreadsheet(); // add new worksheet Worksheet Sheet = 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"; // 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