Font Style In Cell - VB.NET
Spreadsheet SDK sample in VB.NET demonstrating ‘Font Style In Cell’
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 = 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
Resources.Designer.vb
��' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
' <