Free Trial
Web API version
Licensing
Request A Quote
HAVE QUESTIONS OR NEED HELP? SUBMIT THE SUPPORT REQUEST FORM or write email to SUPPORT@BYTESCOUT.COM
Font Style In Cell | VB.NET

Module1.vb:
VB
Imports Bytescout.Spreadsheet Imports System.IO Module Module1 Sub Main() ' Create new Spreadsheet Dim document As New Spreadsheet() ' Add new worksheet Dim worksheet = document.Workbook.Worksheets.Add("Sheet1") ' Apply rich text formatting Worksheet.Cell("A1").Value = "Arial Italic Bold, Size=23" worksheet.Cell("A1").Font = New System.Drawing.Font("Arial", 23, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic) ' 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