Skip to main content

类似xargs命令,遍历依据是excel表单中的每一行。命令参数,允许被string.format替换,替换内容为指定单元格值。

Project description

xlsx-xargs

类似xargs命令,遍历依据是excel表单中的每一行。命令参数,允许被string.format替换,替换内容为指定单元格值。

命令说明

    E:\xlsx-xargs>python xlsx_xargs.py --help
    Usage: xlsx_xargs.py [OPTIONS] [COMMANDS]...

    类似xargs命令,遍历依据是excel表单中的每一行。命令参数,允许被string.format替换,替换内容为指定单元格值。

    注意:

    COMMANDS前加两个减号,可表示减号后均为COMMANDS参数。 xlsx-xargs [OPTIONS] -- [COMMANDS]...

    Options:
    -f, --file TEXT   Excel文件路径。  [required]
    -s, --sheet TEXT  表单页名称。默认为当前页。
    -r, --rows TEXT   指定需要处理的行。默认为所有行。
    -t, --test TEXT   使用正则对行进行过滤,只处理匹配的行。允许使用多个表达式,多个表达式之间求与。
    --help            Show this message and exit.

注意事项

  • rows 要遵从rows规则。
  • tests 要遵从test规则。
  • COMMANDS 前加--,可以防止参数冲突问题。

rows规则

  • 1 == [1]
  • 1,2,3 == [1,2,3]
  • 1-3 == [1,2,3]
  • 1-3,5 == [1,2,3,5]
  • 3- == [3,4,5,6....] # 从第3行开始,直到最后一行。

test规则

  • 每个test都是由(列名+":"+正则)组成,如(A:\d+)。
  • 可以由多个test组成。
  • 多个test求“与”为最后结果。

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

xlsx-xargs-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

xlsx_xargs-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file xlsx-xargs-0.1.0.tar.gz.

File metadata

  • Download URL: xlsx-xargs-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for xlsx-xargs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0c5e9666964abba48e57afdc474afb49d8392b35933efeddc493ad23f4b0790a
MD5 09cbfb87be336d8ccfbbee87c9cc49bc
BLAKE2b-256 b2408cc674785561c598b7126c707dc8738d2ec69eadced3ac1b26cc29a654e8

See more details on using hashes here.

File details

Details for the file xlsx_xargs-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: xlsx_xargs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for xlsx_xargs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec6359bb54f3e14c41b65ae7c8e76734af141fbfc41b031de5106e57712f727d
MD5 287fefabdcf70ff044fc01b524811f1b
BLAKE2b-256 a1ace10687d21edee50891f4e04858706f0c5b12aae7a990f829d0d348f6a6fb

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