tarvitz / xlsx-dr

XLSX dirty reader, supports reading xlsx images and shows their position in the sheets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XLSX dirty reader

!!!NOTE!!!* That's dirty reader, hope you don't even try to use it. Please check other repositories and tools to get acquainted how to extract pictures from cells.

local

Installation

For general installation you would probably need virtual environment with pip installed:

user@localhost$ virtualenv --no-site-packages venv
user@localhost$ source venv/bin/activate
user@localhost$ pip install -r requirements/base.txt

optional

user@localhost$ pip install -r requirements/docs.txt

Dependencies

  • lxml-3.3.0+
  • openpyxl-1.8.2 +
  • sphinx (for docs)

Tests

Simply run

user@localhost$ python setup.py test

Or you could run tests via python -m unittest module or via run_tests.sh script

user@localhost$ ./run_tests.sh tests.XlsxReader

Using tox you can achieve fast and simple test runs.

user@localhost$ tox

Usage

You can parse Xlsx (MS Excel 2007 format) files and get data in standard python dictionary format or json (simplejson required)

from xlsx.reader import XlsxReader
reader = XlsxReader('file.xlsx')
data = reader.get_data(sheet_name='Sheet1')
img_data = reader.get_images()

that's all folks

About

XLSX dirty reader, supports reading xlsx images and shows their position in the sheets


Languages

Language:Python 96.1%Language:Makefile 3.5%Language:Shell 0.3%