A tool for excel
Project description
#Demo
##新建Excel文件 import os import jerryExcel
# step 1
excel=jerryExcel.ExcelUtil()
path=os.getcwd()
# 设置文件保存路径
filepath=os.path.join(path,"test.xls")
# 传入文件路径 以及表名
newExcel=excel.NewExcelFile(filepath,"sheet1")
# step 2 准备写入的数据
content=["test1","test2","test3"]
newExcel.write(content)
# 传空值相当于换行
newExcel.write()
newExcel.write(content)
# step 3 保存
newExcel.save()
追加excel数据
# 追加excel文件
# step 1 设置文件路径
excel=jerryExcel.ExcelUtil()
path=os.getcwd()
filepath=os.path.join(path,"test.xls")
addtion=excel.AddtionWrite(filepath)
# step 2 写入数据
content=["test1","test2","test3"]
addtion.write(content)
addtion.write()
addtion.write(content)
# step 3 保存
addtion.save()
读取excel数据
# step 1 设置文件路径
excel = jerryExcel.ExcelUtil()
path = os.getcwd()
filepath = os.path.join(path, "test.xls")
cursor = excel.Cursor(filepath)
# step 2 读取数据
datas = cursor.read(ignoreFirstLine=False, index=0)
# step 3 遍历输出数据
for data in datas:
print(data)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jerryExcel-1.0.1.tar.gz
(2.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jerryExcel-1.0.1.tar.gz.
File metadata
- Download URL: jerryExcel-1.0.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb5fb3704bbb098a8790ae4e82bb3e2c4e98bd1c2a7dd4e6fad9b43c69e1e24a
|
|
| MD5 |
329aefe5026a2420928bb5c80f998ca6
|
|
| BLAKE2b-256 |
5e420ce1e179b8bb5dfd32f60d59bd203eb0d278ac47dc0148885a587b2094e5
|
File details
Details for the file jerryExcel-1.0.1-py3-none-any.whl.
File metadata
- Download URL: jerryExcel-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0eb685f87ace0117b41b4b204ebc299104945d295b8396ed4eb1e28a562a62d
|
|
| MD5 |
defdcb99b738c1b81a64e5ca5157aab1
|
|
| BLAKE2b-256 |
03d0053b5333095ca17973a7b200d9a47f02d1dd995e5d3a9bfbe0cc6e64b304
|