Code Monkey home page Code Monkey logo

excel2img's Introduction

excel2img

Save ranges from Excel documents as images

Requirements

  1. Python 2.7, 3.3 or later
  2. pywin32
  3. Pillow >= 3.3.1
  4. Microsoft Excel (tested with Office 2013, on Windows 10)

Installation

pip install excel2img

Usage as python module

import excel2img

# Save as PNG the range of used cells in test.xlsx on page named "Sheet1"
excel2img.export_img("test.xlsx", "test.png", "Sheet1", None)

# Save as BMP the range B2:C15 in test.xlsx on page named "Sheet2"
excel2img.export_img("test.xlsx", "test.bmp", "", "Sheet2!B2:C15")

# Save as GIF the range "MyNamedRange"
excel2img.export_img("test.xlsx", "test.gif", "", "MyNamedRange")

Usage from command line

# Save as PNG the range of used cells in test.xlsx on first page
python excel2img.py test.xlsx test.png

# Save as PNG the range of used cells in test.xlsx on page "Sheet2"
python excel2img.py test.xlsx test.png -p Sheet2

# Save as PNG the range "MyNamedRange"
python excel2img.py test.xlsx test.png -r MyNamedRange

# More range syntax examples
python excel2img.py test.xlsx test.gif -r 'Sheet3!B5:C8'
python excel2img.py test.xlsx test.bmp -r 'Sheet4!SheetScopedNamedRange'

Author

Alexey Gaydyukov <[email protected]>

License

Apache License 2.0

Credits

Inspired by visio2img

excel2img's People

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.