ByteScout Spreadsheet SDK - VB.NET - Set ShrinkToFit for Cells - ByteScout

ByteScout Spreadsheet SDK – VB.NET – Set ShrinkToFit for Cells

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – VB.NET – Set ShrinkToFit for Cells

How to set shrinktofit for cells in VB.NET using ByteScout Spreadsheet SDK

How to code in VB.NET to set shrinktofit for cells with this step-by-step tutorial

The documentation is designed to help you to implement the features on your side. Want to set shrinktofit for cells in your VB.NET app? ByteScout Spreadsheet SDK is designed for it. ByteScout Spreadsheet SDK is the SDK component for writing, reading, modifying and calculating Excel and CSV spreadsheets. Can calculate and reculculate formulas with Excel installed. You may import or export data to and from CSV, XML, JSON. Supports export to databases, arrays, streams.

This code snippet below for ByteScout Spreadsheet SDK works best when you need to quickly set shrinktofit for cells in your VB.NET application. In order to implement the functionality, you should copy and paste this code for VB.NET below into your code editor with your app, compile and run your application. Code testing will allow the function to be tested and work properly with your data.

ByteScout Spreadsheet SDK free trial version is available on our website. VB.NET and other programming languages are supported.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Module1.vb
      
Imports Bytescout.Spreadsheet Imports System.IO Module Module1 Sub Main() ' Create new Spreadsheet Dim document As New Spreadsheet() ' Add new worksheet Dim worksheet As 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 ' 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

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Explore Samples

Sign Up for ByteScout Spreadsheet SDK 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 Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Explore Samples

Sign Up for ByteScout Spreadsheet SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next