Python 处理Excel
来源:互联网 发布:shell在哪编程 编辑:程序博客网 时间:2024/06/06 08:58
1. 安装openpyxl
pip install openpyxl
2. 读取Excel和写入Excel
import openpyxlwb = openpyxl.load_workbook('example.xlsx')sheet = wb.get_sheet_by_name('Sheet1')for i in range(1, 8, 2): print(i, sheet.cell(row=i, column=2).value)sheet['A9'] = 200sheet['C8'] = '=SUM(C1:C7)'sheet.cell(row=9, column=2).value = 122wb.save('example.xlsx')
可以通过row和colum来确定某一个格子,也可以用A9这样的。内容可以直接写公式
http://www.waitingfy.com/archives/1824
阅读全文
1 0
- 【Python】Python处理Excel
- python处理excel表格
- python 处理excel
- Python处理Excel数据
- Python处理Excel数据
- python 处理中文Excel
- Python处理Excel文件
- python 处理excel
- python处理excel表格
- python处理excel
- Python 处理excel文件
- Python处理excel表格
- python处理excel
- python 处理 excel格式文件
- python处理excel
- Python处理excel数据
- Python之excel处理
- python处理excel
- tomcat中部署war包
- mongodb replica set介绍
- GHGL项目总结-Myeclipse
- Android性能优化之内存优化(二)
- Java中IO流,输入输出流概述与总结
- Python 处理Excel
- 数组的常用方法
- Prototype模式
- Python多线程和多进程
- HDU 1009 FatMouse' Trade
- sbt构建scala project: Waiting for lock
- faster-RCNN算法原理详解
- Scala中的特质详解
- SQL 树查询