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
Change Cell Background Color | VBScript
ChangeCellBackgroundColor.vbs:
VB
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