ByteScout Spreadsheet SDK – VBScript – Change Cell Background Color

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – VBScript – Change Cell Background Color

ByteScout Spreadsheet SDK – VBScript – Change Cell Background Color

ChangeCellBackgroundColor.vbs

Set document = CreateObject("Bytescout.Spreadsheet.Spreadsheet")

document.RegistrationName = "demo"
document.RegistrationKey = "demo"

 ' Add new worksheet
Set worksheet = document.Workbook.Worksheets.Add("HelloWorld")

' add cell with HTML formatted text
Set cell = worksheet.Cell(1, 1)
cell.Value = "One Two Three"

cell.FillPattern = 1 ' Solid color
cell.FillPatternForeColorOLE = vbMagenta ' use standard VB color constants or hex values &HFFFF00

' save document
document.SaveAs "Output.xls"

' close Spreadsheet
Set document = Nothing


  Click here to get your Free Trial version of the SDK

prev
next