python win32com : Change Excel formula witout inputing value yourself -


is there way change formula without inputing new value yourself? example:

données!$ex$68:$in$68   

should become

données!$ey$68:$in$68 

i don't want calculate myself ey comes after ex, since can go 4 letter.

thanks.

you use r1c1 formatting this:

row1 = 1 column1 = 2 row2 = 10 column = 2  formula = "=sum(r%(first)sc%(second)s:r%(third)sc%(fourth)s)" % {'first':row1,                                                                   'second':column1,                                                                   'third':row2,                                                                   'fourth':column} xl.cells(1,1).formular1c1 = formula 

makes formula: =sum($b$1:$b$10) in cell a1. there's lots of neat things can r1c1 formatting in excel, using [] denote offsets. makes writing formulas python bit less painful. hope helps!


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -