python excel公式
时间: 2023-09-06 14:09:07 浏览: 88
在Python中,你可以使用openpyxl库来读取和操作Excel文件中的公式。首先,你需要使用`openpyxl.load_workbook()`函数加载Excel文件,然后设置`data_only=True`参数以确保读取到公式的结果而不是公式本身。然后,你可以使用`sheet['A3'].value`来读取Excel文件中A3单元格的值,即公式的结果。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Python读取excel文件中带公式的值的实现](https://blog.csdn.net/nishuideyu_/article/details/115583323)[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: 50%"]
- *3* [Python在Excel单元格中写入公式](https://blog.csdn.net/weixin_40049608/article/details/121769154)[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: 50%"]
[ .reference_list ]
阅读全文