如何改变EXCEL里面格子的颜色??
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Set xlApp = New Excel.Application
Set xlBook = xlApp.Workbooks.Open("C:\OutDemo.xls", , False)
Set xlSheet = xlBook.Worksheets(1)
With xlSheet.d
'写入报表日期
.Cells(5, 8) = CStr(Date)
End With
xlBook.Save
xlApp.Quit
请问如果我要把格子Cells(1,1)的颜色变成黄色,怎么办,怎么动态的添加代码
(不要在OutDemo.xls中手动修改)
请写明代码,非常感激