Hi All,
I am using the following code to write data into an excel sheet:
# Open the Output Spreadsheet
objExcel = win32com.client.Dispatch("Excel.Application")
# Creating object to write to Spreadsheet
self.xlApp =Dispatch("Excel.Application")
# Creating Workbook
self.Wkbk = self.xlApp.Workbooks.Add()
# Get sheet count
intShtCnt=self.Wkbk.Worksheets.Count
# Creating worksheets
wsObjReport = self.Wkbk.Worksheets.Add()
# Setting names to the sheets
wsObjReport.Name="Report"
# Alignment Variables
xlLeft, xlRight, xlCenter = -4131, -4152, -4108
# Loop to remove extra sheets(created by default)
for intiLoopIndex in range(1,intShtCnt+1):
self.Wkbk.Worksheets("Sheet"+str(intiLoopIndex)).Delete()
# Setting active sheet
sheets = self.Wkbk.Sheets
sheets("Report").Activate()
I am able to change the default sheet name to "Report". I want to change the color of the excel sheet from WHITE to YELLOW. How can I do it?...
Any help is much appreciated.
Regards,
Dinil