GithubHelp home page GithubHelp logo

nonomal / xls_handler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from loyux/xls_handler

0.0 1.0 0.0 32 KB

提取大量特定形式的excel文件到一个excel中

License: Apache License 2.0

Python 100.00%

xls_handler's Introduction

Python处理excel脚本

1.功能介绍

将如下格式的excel提取到一张表格的一行中,第一行取自所有表格的索引

i>运行目录:程序所在目录

ii>运行前安装:pip install -r requirments.txt

iii>运行命令 python xlshand.py

iv>输出文件为 output.xls

提取当前文件夹下形如的xls文件,将其按照索引和值输出到一个汇总表,汇总表每行代表一张表的数据

1列为索引,2列为值,依次类推

idx1 1 idx2 2
idx3 3 idx4 4
idx5 5
idx6 6

如此类结构,第一列为索引,第二列为值的格式,将其统一输出到一个excel中,形如:

idx1 idx2 idx3 idx4 idx5 idx6
1 2 3 4 5 6

多张表形如

idx1 idx2 idx3 idx4 idx5 idx6
1 2 3 4 5 6
k k k

2.测试

3.扩展

执定行或列为索引,与对应的值,进行提取

PS:目前已知的问题

1.对于不存在索引存在值的excel格式报错(已解决)

idx1 1 idx2 2
3 idx4 4

2.对于存在索引不存在值的excel格式报错已解决)

idx1 1
idx3

3.如果索引为1,2,3等数字类型报错

str(int)无法解决

Error

idx1 1
2 2

以下可以处理

idx1 value1
"123"

xls_handler's People

Contributors

loyux avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.