I'm using xlrd package for python to generate my excel reports.
for some fields, they are a calculations from other fields.
I'm using
worksheet.write(1, 2, '178', formatting )
worksheet.write(1, 3, '100', formatting )
for the field (1,4) is the SUM of (1,2) and (1,3)
I can do that if I used : worksheet.write(1, 4, '=SUM(A1,B1)', formatting )
but in my case I'm using numbers (col, row) instead of letters (A1).
I tried chr(1)+':1' - chr(1)+':2'
but seems like the letters I'm getting don't reflect the numbers.
Any thoughts will be highly appreciated!
The solution I'm using for now is
value1 = '178'
value2 = '100'
worksheet.write(1, 2, value1, formatting )
worksheet.write(1, 3, value2, formatting )
worksheet.write(1, 4, value1+value2 , formatting )
but as you see I'm not using built in excel formulas and the excel user won't see where the value came from. like what was the calculation used?. exactly for finance department.
Thanks!