xlwings: Referencing a Single Cell

xlwings code:

#Referencing a Single Cell

import xlwings as xw    #Import the xlwings package

bk=xw.Book()
sht=bk.sheets.active    #Get the active worksheet

#xlwings
sht.range('C3').select()
#sht.range(3,3).select()
#sht['C3'].select()
#sht.cells(3,3).select()
#sht.cells(3,'C').select()

#xlwings API
#sht.api.Range('C3').Select()
#sht.api.Cells(3, 'C').Select()
#sht.api.Cells(3,3).Select()

bk.close()
app.kill()


category : xlwings: Object Model

Leave a Reply

Your email address will not be published. Required fields are marked *

Zoomed Image