ByteScout Spreadsheet SDK - VB.NET - Fonts Available For Cells - ByteScout

ByteScout Spreadsheet SDK – VB.NET – Fonts Available For Cells

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – VB.NET – Fonts Available For Cells

fonts available for cells in VB.NET using ByteScout Spreadsheet SDK

How to use ByteScout Spreadsheet SDK for fonts available for cells in VB.NET

Sample source codes below will show you how to cope with a difficult task, for example, fonts available for cells in VB.NET. ByteScout Spreadsheet SDK was made to help with fonts available for cells in VB.NET. 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.

You will save a lot of time on writing and testing code as you may just take the code below and use it in your application. VB.NET sample code is all you need: copy and paste the code to your VB.NET application’s code editor, add a reference to ByteScout Spreadsheet SDK (if you haven’t added yet) and you are ready to go! You can use these VB.NET sample examples in one or many applications.

Trial version can be obtained from our website for free. It includes this and other source code samples for VB.NET.

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

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") ' Create array with font names Dim fontNames() As String = {"Helvetica", "Times New Roman", "Verdana", "Times New Roman"} ' Use all fonts in fontsNames array For i As Integer = 0 To fontNames.Length - 1 ' Set font size based on loop counter Dim fontSize As Double = 10 + i * 3 'Set cell font type and font size worksheet.Cell(i, 0).Font = New System.Drawing.Font(fontNames(i), fontSize) ' Set cell value worksheet.Cell(i, 0).Value = fontNames(i) Next ' 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

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

VIDEO

ON-PREMISE VERSION INFORMATION

Get 60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Get ByteScout Spreadsheet SDK Free Training

WEB API

Get Your Free API Key

Explore Web API Documentation

Tutorials:

prev
next