Skip to main content

Render tree structure diagram using border on Excel.

Project description

pyxltree

エクセルのワークシートの境界線を使って、ツリー構造図を描画します

例:ディレクトリー・パス

Output:

View

👆 わたしのWindows PCのCドライブの例です

Input:

Data

no,node0,node1,node2,node3,node4,node5,node6,node7,node8
1,C,Users,Muzudho,OneDrive,Documents,Tools,GitHub,,
2,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Engine,Lesserkai.exe
3,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Engine,Lesserkai_ja.txt
4,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Engine,public.bin
5,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,ja,Shogidokoro.resources.dll
6,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Engine.xml,
7,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,GameResult.xml,
8,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Shogidokoro.exe,
9,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,Shogidokoro.xml,
10,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro,お読みください.txt,
11,C,Users,Muzudho,OneDrive,Documents,Tools,Shogidokoro.zip,,
12,C,Users,Muzudho,OneDrive,Documents,Tools,Visual Studio 2022,,
13,C,Users,Muzudho,OneDrive,Documents,Tools,Default.rdp,,

👆 さきほどの Output の図は、上図の CSV ファイルを読込ませると描いてくれます。
node 列は 0 から始まる連番で増やすことができます。常識的な長さにしてください

Script:

from xltree import WorkbookControl


def execute():

    # 出力先ワークブック指定
    wbc = WorkbookControl(target='./tests/temp/tree_drive.xlsx')

    # ワークシート描画
    wbc.render_worksheet(target='Drive', based_on='./tests/data/tree_drive.csv')

    # 何かワークシートを1つ作成したあとで、最初から入っている 'Sheet' を削除
    wbc.remove_worksheet(target='Sheet')

    # 保存
    wbc.save_workbook()

👆 上記はスクリプトの記述例です

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

xltree-0.0.3.tar.gz (237.1 kB view details)

Uploaded Source

Built Distribution

xltree-0.0.3-py2.py3-none-any.whl (16.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file xltree-0.0.3.tar.gz.

File metadata

  • Download URL: xltree-0.0.3.tar.gz
  • Upload date:
  • Size: 237.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for xltree-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f9b26e1db48c1fe0b586fa7f05775dc3a4e0e6f0dc4764c84d105cc66601b21e
MD5 1b92d02d1ff4bcd174ed5124225f66b4
BLAKE2b-256 e1336ccc15da3a0bf5d770ba2a6862514419bdfbadfda51f67b278825f644b0a

See more details on using hashes here.

File details

Details for the file xltree-0.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: xltree-0.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for xltree-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9ed43083506df8fcd39076d56b83575c5351cad53e2dd27602ae338af0926f55
MD5 a69941c58e47329b1c230b35a2f2c800
BLAKE2b-256 062fa946f4a35e85c91d4c7ac56717d927e8e85b66b8a478d8c337fdbdc0ba77

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