ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/Tool_Box/ExcelLib.py
(Generate patch)

Comparing Python/NinoCode/Tool_Box/ExcelLib.py (file contents):
Revision 706 by nino.borges, Wed May 13 15:29:53 2020 UTC vs.
Revision 707 by nino.borges, Wed Jul 15 15:19:04 2020 UTC

# Line 47 | Line 47 | class ExcelConnection:
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)
# Line 56 | Line 56 | class ExcelConnection:
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)"

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)