xlsxr


Namexlsxr JSON
Version 0.1 PyPI version JSON
download
home_page
SummaryRead very large Excel XLSX files efficiently
upload_time2023-01-27 22:44:08
maintainer
docs_urlNone
authorDavid Megginson
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            xlsx-reader
===========

Python3 library optimised for reading very large Excel XLSX files, including those with hundreds of columns as well as rows. 

## Simple example

```
from xlsxr import Workbook

workbook = Workbook(filename="myworkbook.xlsx", convert_values=True)

for sheet in workbook.sheets:
    print("Sheet ", sheet.name)
    for row in sheet.rows:
        print(row)
```

## Conversions

By default, everything is a string, and all dates and datetimes will appear in ISO 8601 format (YYYY-mm-dd or YYYY-mm-ddTHH:MM:SS). If you supply the option _convert\_values_ to the Worksheet constructor, the library will convert numbers to ints or floats, and dates to datetime.datetime or datetime.date objects. There is no attempt to handle standalone times.

Empty cells appear as the empty string ''.

## xlsxr.workbook.Workbook class

### Constructor

The xlsxr.Workbook class constructor takes the following keyword arguments:

Argument | Description
-- | --
filename | Path to an Excel file on the local filesystem.
stream | A file-like object (byte stream)
url | The URL of a remote Excel file
convert\_values | If True, convert numbers and dates from strings to Python values (default is False)
fill\_merged | If True, repeat values to fill merged areas (default is False)

You may specify only one of _filename,_ _stream,_ or _url._

### Properties

Property | Description
-- | --
sheets | A list of xlsxr.sheet.Sheet objects
styles | A list of xlsxr.style.Style objects

## xlsxr.sheet.Sheet class

### Properties

Property | Description
workbook | The parent Workbook objet
name | The name of the sheet
sheet\_id | The internal identifier of the sheet
state | The state of the sheet (normally 'visible' or 'hidden')
relation\_id | ??
cols | A list of metadata for each column.
rows | A list of the data rows in the sheet (parsed on demand).
merges | A list of merges in the sheet (parsed on demand).

Each row is a list of scalar values. The will all be strings or None unless you specified the _convert\_values_ option for the Workbook.

Merges appear as strings defining ranges, e.g. "A1:C3".

### Columns

Columns are represented as dict objects with the following properties:

Key | Description
-- | --
collapsed | True if the column is collapsed.
hidden | True if the column is hidden
min | ??
max | ??
style | A key into the _styles_ property of the workbook.

## xlsxr.style.Style class

### Properties

Property | Description
-- | --
number\_formats | ??
cell\_style\_formats | ??
cell\_formats | ??
cell\_styles | ??

## License

This is free and unencumbered software released into the public domain. See UNLICENSE.md for details.



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "xlsxr",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "David Megginson",
    "author_email": "megginson@un.org",
    "download_url": "https://files.pythonhosted.org/packages/e8/d0/6cc555320e30342b2efea31d3ad0d8da7b7cc00ed89970387db6bddd1882/xlsxr-0.1.tar.gz",
    "platform": null,
    "description": "xlsx-reader\n===========\n\nPython3 library optimised for reading very large Excel XLSX files, including those with hundreds of columns as well as rows. \n\n## Simple example\n\n```\nfrom xlsxr import Workbook\n\nworkbook = Workbook(filename=\"myworkbook.xlsx\", convert_values=True)\n\nfor sheet in workbook.sheets:\n    print(\"Sheet \", sheet.name)\n    for row in sheet.rows:\n        print(row)\n```\n\n## Conversions\n\nBy default, everything is a string, and all dates and datetimes will appear in ISO 8601 format (YYYY-mm-dd or YYYY-mm-ddTHH:MM:SS). If you supply the option _convert\\_values_ to the Worksheet constructor, the library will convert numbers to ints or floats, and dates to datetime.datetime or datetime.date objects. There is no attempt to handle standalone times.\n\nEmpty cells appear as the empty string ''.\n\n## xlsxr.workbook.Workbook class\n\n### Constructor\n\nThe xlsxr.Workbook class constructor takes the following keyword arguments:\n\nArgument | Description\n-- | --\nfilename | Path to an Excel file on the local filesystem.\nstream | A file-like object (byte stream)\nurl | The URL of a remote Excel file\nconvert\\_values | If True, convert numbers and dates from strings to Python values (default is False)\nfill\\_merged | If True, repeat values to fill merged areas (default is False)\n\nYou may specify only one of _filename,_ _stream,_ or _url._\n\n### Properties\n\nProperty | Description\n-- | --\nsheets | A list of xlsxr.sheet.Sheet objects\nstyles | A list of xlsxr.style.Style objects\n\n## xlsxr.sheet.Sheet class\n\n### Properties\n\nProperty | Description\nworkbook | The parent Workbook objet\nname | The name of the sheet\nsheet\\_id | The internal identifier of the sheet\nstate | The state of the sheet (normally 'visible' or 'hidden')\nrelation\\_id | ??\ncols | A list of metadata for each column.\nrows | A list of the data rows in the sheet (parsed on demand).\nmerges | A list of merges in the sheet (parsed on demand).\n\nEach row is a list of scalar values. The will all be strings or None unless you specified the _convert\\_values_ option for the Workbook.\n\nMerges appear as strings defining ranges, e.g. \"A1:C3\".\n\n### Columns\n\nColumns are represented as dict objects with the following properties:\n\nKey | Description\n-- | --\ncollapsed | True if the column is collapsed.\nhidden | True if the column is hidden\nmin | ??\nmax | ??\nstyle | A key into the _styles_ property of the workbook.\n\n## xlsxr.style.Style class\n\n### Properties\n\nProperty | Description\n-- | --\nnumber\\_formats | ??\ncell\\_style\\_formats | ??\ncell\\_formats | ??\ncell\\_styles | ??\n\n## License\n\nThis is free and unencumbered software released into the public domain. See UNLICENSE.md for details.\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Read very large Excel XLSX files efficiently",
    "version": "0.1",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e8d06cc555320e30342b2efea31d3ad0d8da7b7cc00ed89970387db6bddd1882",
                "md5": "0923ca916f42890d1f6cb9185c4040dc",
                "sha256": "918612299c93c3cbed256840fd21ddfc3edb3f59f80b27980d9519b642eb630a"
            },
            "downloads": -1,
            "filename": "xlsxr-0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0923ca916f42890d1f6cb9185c4040dc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8783,
            "upload_time": "2023-01-27T22:44:08",
            "upload_time_iso_8601": "2023-01-27T22:44:08.585432Z",
            "url": "https://files.pythonhosted.org/packages/e8/d0/6cc555320e30342b2efea31d3ad0d8da7b7cc00ed89970387db6bddd1882/xlsxr-0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-27 22:44:08",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "xlsxr"
}
        
Elapsed time: 0.09580s