| Trees | Indices | Help |
|---|
|
|
1 import string 24 if len(colLet)==2: 5 Ncol = 26*(ord( string.upper(colLet[0]) ) - 64) + ord( string.upper(colLet[1]) ) - 64 6 elif len(colLet) ==1: 7 Ncol = ord( string.upper(colLet) ) - 64 8 else: 9 Ncol = 1 10 return Ncol1113 sp = string.split( cell, '$') 14 Ncol=1 15 Nrow=1 16 try: 17 Ncol = getNcolFromLetter( sp[1] ) 18 Nrow = string.atoi( sp[2] ) 19 except: 20 pass 21 return Ncol, Nrow2224 sp = string.split( crange, ':' ) 25 Ncolumns=0 26 Nrows=0 27 try: 28 if len(sp[1])>0: 29 Nc1, Nr1 = getNcolNrow( sp[0] ) 30 Nc2, Nr2 = getNcolNrow( sp[1] ) 31 Ncolumns = Nc2 - Nc1 + 1 32 Nrows = Nr2 - Nr1 + 1 33 except: 34 pass 35 return Ncolumns, Nrows3638 '''excel spreadsheet chart formulas for XY Series''' 399741 self.labelLoc = self.makeColLocation( NColumn=col, NRow=row) 42 if len(Sheet)>0: self.labelSht = Sheet4345 self.xcolRng = self.makeColRange( NColumn=col, fromRow=topRow, toRow=botRow) 46 if len(Sheet)>0: self.xcolSht = Sheet4749 self.valRng = self.makeColRange( NColumn=col, fromRow=topRow, toRow=botRow) 50 if len(Sheet)>0: self.valSht = Sheet5153 '''from self.formula, split into individual parts''' 54 sp = string.split( self.formula, ',') 55 self.labelSht, self.labelLoc = string.split( sp[0], '!') 56 self.labelSht = string.split( self.labelSht, '(')[1] 57 58 self.xcolSht, self.xcolRng = string.split( sp[1], '!') 59 self.valSht, self.valRng = string.split( sp[2], '!') 60 self.seriesNum = string.split( sp[3], ')')[0]6163 '''return the letter representation of excel columns''' 64 if NColumn>26: 65 r = NColumn % 26 - 1 66 q = NColumn / 26 - 1 67 return string.uppercase[q] + string.uppercase[r] 68 else: 69 return string.uppercase[NColumn-1]70 74 7880 L1 = self.excelColLetter( fromColumn ) 81 L2 = self.excelColLetter( toColumn ) 82 return '$'+L1+'$'+str(fromRow) +':'+ '$'+L2+'$'+str(toRow)8385 return '=SERIES(' + self.labelSht + '!' + self.labelLoc + \ 86 ',' + self.xcolSht + '!' + self.xcolRng +\ 87 ',' + self.valSht + '!' + self.valRng + \ 88 ',' + self.seriesNum + ')'89 93
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Sat Jan 24 11:54:20 2009 | http://epydoc.sourceforge.net |