xlwings读取excel文件行列
时间: 2023-10-20 09:06:08 浏览: 111
要使用xlwings库读取Excel文件的行列,可以按照以下步骤进行操作:
1. 首先,确保已经安装了xlwings库。
2. 打开Excel表格并导入xlwings库:
```python
import xlwings as xw
# 打开Excel表格
book = xw.Book('路径/文件名.xlsx')
```
3. 选择要操作的工作表:
```python
# 打开第一个工作表
sht = book.sheets<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [python xlwings库读写excel文件](https://blog.csdn.net/gao_xin_xing/article/details/118787366)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文