import xlwings as xw
app = xw.App(visible=False) # 隐藏Excel
wb = app.books.open('文档1.xlsx') # 打开工作簿
sht = wb.sheets['Sheet1'] # 实例化工作表1
#获取行数和列数
rows_count=sht.range(1, 1).expand().shape[0]
cols_count=sht.range(1, 1).expand().shape[1]
print(rows_count,cols_count)
#获取指定单元格的内容
data = sht.range('C%s' %rows_count).value
print(data)
wb.close()
app.quit()