ByteScout Barcode Suite - C# - Set shrinktofit for cells with spreadsheet sdk - ByteScout

ByteScout Barcode Suite – C# – Set shrinktofit for cells with spreadsheet sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Suite – C# – Set shrinktofit for cells with spreadsheet sdk

How to set shrinktofit for cells with spreadsheet sdk in C# using ByteScout Barcode Suite

How to write a robust code in C# to set shrinktofit for cells with spreadsheet sdk with this step-by-step tutorial

Every ByteScout tool includes simple example C# source codes that you can get here or in the folder with installed ByteScout product. ByteScout Barcode Suite is 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 be applied to set shrinktofit for cells with spreadsheet sdk using C#.

The SDK samples given below describe how to quickly make your application do set shrinktofit for cells with spreadsheet sdk in C# with the help of ByteScout Barcode Suite. Just copy and paste the code into your C# application’s code and follow the instructions. Enjoy writing a code with ready-to-use sample codes in C#.

The trial version of ByteScout Barcode Suite can be downloaded for free from our website. It also includes source code samples for C# and other programming languages.

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 System.Diagnostics; using Bytescout.Spreadsheet; using System.IO; namespace HelloWorld { class Program { static void Main(string[] args) { // Create new Spreadsheet Spreadsheet document = new Spreadsheet(); // Add new worksheet Worksheet worksheet = document.Workbook.Worksheets.Add("HelloWorld"); // Set cell value worksheet.Cell(0, 0).Value = "Very, very, very, very long text"; // Shrink text worksheet.Cell(0, 0).ShrinkToFit = true; // 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 Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode 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 Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next