Skip to main content

excel实验模块

Project description

SKY-EXCEL Module

excel工具模块

Part 1. Introduce

介绍

如果你不希望每一次需要把接口返回的字典数据导出成excel表格而去设计表头、合并单元格,而进行一次一次重复大量的编程活动。那么你可以尝试一下这个模块。sky-excel把表头设计与单元格设计耦合到一起,你只需要创建一个excel模板即可,然后进行配置对应输入的字段就可以实现,把接口的数据导出单元格。

这个模块仅仅做了一件事情,就是把你写好的表头版本抄写一般,把字典数据按照键值对匹配填充进去即可。

Part 2. API Document

API 接口文档

export_instance = ExcelExport(
    input_dict=global_export_data, 
    excel_templet_path="./templet/templet.xlsx", 
    save_path="D:\\PySet/sky-excel/templet/"
)
参数介绍
input_dict输入的字典数据格式是[{..},{..}......]
excel_templet_path:保存模板的路径确保程序可以找到你的模板excel文件
excel_templet_title:当前仅仅可以导出一个sheet不可以实现批量的导出所以需要指定默认值Sheet1
save_path:保存的文件路径不传则返回文件流直接返回前端提供下载注意返回时候需要修改响应头协议

导出方法
data, err = export_instance.export()
data:返回文件地址或者文件流前提是没有异常的情况下否则返回空
err:返回的是异常提示

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sky_excel-1.0.4.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

sky_excel-1.0.4-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file sky_excel-1.0.4.tar.gz.

File metadata

  • Download URL: sky_excel-1.0.4.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.5

File hashes

Hashes for sky_excel-1.0.4.tar.gz
Algorithm Hash digest
SHA256 447d31eb1bbf84f517b89559fc3f64d7f6224254a69c751bd8af8b6fabfce618
MD5 711cdba077a697b102aae66883193260
BLAKE2b-256 05c1dcf5d5a917451b779bcdc512d6679a81a372c0a02c8e945e10b87af13e79

See more details on using hashes here.

File details

Details for the file sky_excel-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: sky_excel-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.5

File hashes

Hashes for sky_excel-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4de12968933fe3a2dd6baac55e203be924199541d545678a4df4d434caab2355
MD5 d75823b82c8c96643cc6cd778d682e05
BLAKE2b-256 130c6624acd9de3c25d955612a69ae73a06062f1f1b5f2088fb00b9a95c73038

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page