{"id":22279355,"url":"https://github.com/shortarrow/pyxlimg","last_synced_at":"2025-10-06T17:51:50.120Z","repository":{"id":133123849,"uuid":"345830692","full_name":"ShortArrow/pyxlimg","owner":"ShortArrow","description":"Extracting images from xlsx by python","archived":false,"fork":false,"pushed_at":"2024-03-09T23:13:54.000Z","size":3149,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T03:08:40.676Z","etag":null,"topics":["python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pyxlimg","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShortArrow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-03-09T00:06:05.000Z","updated_at":"2023-01-04T12:22:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe77f0ce-5b86-413e-a9c1-a97420a9cab5","html_url":"https://github.com/ShortArrow/pyxlimg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShortArrow%2Fpyxlimg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShortArrow%2Fpyxlimg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShortArrow%2Fpyxlimg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShortArrow%2Fpyxlimg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShortArrow","download_url":"https://codeload.github.com/ShortArrow/pyxlimg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245521021,"owners_count":20628996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python"],"created_at":"2024-12-03T15:19:07.390Z","updated_at":"2025-10-06T17:51:45.071Z","avatar_url":"https://github.com/ShortArrow.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is pyxlimg\n\nPyxlimg is for extracting images from xlsx. It has a high affinity with other libraries. This is because you can treat the image as an instance of Pillow.Image.\n\n![PyPI - License](https://img.shields.io/pypi/l/pyxlimg)\n![PyPI - Implementation](https://img.shields.io/pypi/implementation/pyxlimg)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyxlimg)\n![PyPI - Wheel](https://img.shields.io/pypi/wheel/pyxlimg)\n![PyPI - Version](https://img.shields.io/pypi/v/pyxlimg)\n\n## Concept\n\nImages are difficult to handle with xlwings, openpyxl, and pylightxl. Especially linter and type annotation are difficult. Complement these. And the goal is to make it easier to do OCR etc. using xlsx in Python.\n\n## Install\n\nRecommended to install using pip.\n\n```sh\npip install pyxlimg\n```\n\n## Usage\n\n```py\nfrom PIL import Image\nfrom pyxlimg import xlimg\n\nTestBookName = \"./your-test-data/TestBook.xlsx\"\n\n\nif __name__ == \"__main__\":\n    TargetBook: xlimg.ImageBook = xlimg.ImageBook()\n    TargetBook.open(TestBookName)\n    print(\"This book named '\" + TargetBook.name + \"'.\")\n    print(\"This book has \" + len(TargetBook.Sheets) + \" sheets.\")\n    print(\"First sheet name is '\" + TargetBook.Sheets[0].displayName + \"'.\")\n    print(\"First sheet has \" + len(TargetBook.Sheets[0].Pictures + \" pictures.\")\n    TargetBook.Sheets[1].Pictures[0].Image().show() # Show you the Image\n```\n\nIn this way, you can easily assign images to variable.\n\n```py\n    DisplayImage: Image = TargetBook.Sheets[1].Pictures[0].Image()\n    DisplayImage.show() # Show you the Image too.\n```\n\n## FAQ\n\n### What image format does this support?\n\nIf it is supported by [Pillow](https://pypi.org/project/Pillow/), it can be supported. If the original image is in a commonly used format such as png, jpg, bmp when pasted or inserted into xlsx.\n\n### What kind of library is this supposed to be used with?\n\nFor example, `Tesseract OCR`, `pylightxl`, `openpyxl`, `matplotlib`. It is also ideal for matching with other `pillow` related libraries.\n\n## Build\n\nHow to build package.\n\n```bash\npoetry install\npoetry shell\npoetry build\n```\n\nHow to build sphinx docs.\n\n```bash\nsphinx-apidoc -f -o ./docs ./pyxlimg\nsphinx-build -b html ./docs ./docs/_build\n```\n\nIn Windows\n\n```pwsh\npyenv install 3.11.0\npyenv local 3.11.0\npoetry install\npoetry shell\npytest\npoetry build\n```\n\nDocker\n\n```bash\ndocker compose up -d --build\ndocker compose logs -f\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshortarrow%2Fpyxlimg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshortarrow%2Fpyxlimg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshortarrow%2Fpyxlimg/lists"}