Place value into Excel cell through xlwings based on row number and column number

Viewed 2198

Suppose I want to place value 123 into Excel cell A2 which corresponds to row=1, column=2. How do I do this through xlwings?

I am using xlwings 0.19.4, python 3.7, Excel 2016.

1 Answers

I will answer my own question.

wb = xw.Book.caller()
sheet = wb.sheets[0]
row_num = 1
col_num = 2
sheet.range(row_num, col_num).value = 123
Related