An easy to understand sample source code to learn how to set shrinktofit for cells with spreadsheet sdk in VB.NET 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 VB.NET.
Want to quickly learn? This fast application programming interfaces of ByteScout Barcode Suite for VB.NET plus the guidelines and the code below will help you quickly learn how to set shrinktofit for cells 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. Applying VB.NET application mostly includes various stages of the software development so even if the functionality works please test it with your data and the production environment.
The trial version of ByteScout Barcode Suite can be downloaded for free from our website. It also includes source code samples for VB.NET and other programming languages.
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