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.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
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
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: