| 47 |
|
sht = self.xlBook.Worksheets(sheet) |
| 48 |
|
sht.Cells(row,col).NumberFormat = format |
| 49 |
|
|
| 50 |
< |
def setCellProperties(self, sheet, row, col, font = None, fontSize = None): |
| 50 |
> |
def setCellProperties(self, sheet, row, col, font = None, fontSize = None, cellColor = None): |
| 51 |
|
"""A catch all for changing the properties of a cell. I can keep adding to this to avoid too many methods""" |
| 52 |
|
sht = self.xlBook.Worksheets(sheet) |
| 53 |
|
#sht.Cells(1,"A").AutoFilter(Field = 1, VisibleDropDown= False) |
| 56 |
|
pass |
| 57 |
|
if fontSize: |
| 58 |
|
sht.Cells(row,col).Font.Size = fontSize |
| 59 |
+ |
if cellColor: |
| 60 |
+ |
sht.Cells(row,col).Interior.ColorIndex = cellColor |
| 61 |
|
|
| 62 |
|
def getRange(self,sheet,row1,col1,row2,col2): |
| 63 |
|
"return a 2d array (i.e. tuple of tuples)" |