pyxlsb


Namepyxlsb JSON
Version 1.0.10 PyPI version JSON
download
home_pagehttps://github.com/willtrnr/pyxlsb
SummaryExcel 2007-2010 Binary Workbook (xlsb) parser
upload_time2022-10-14 19:17:47
maintainer
docs_urlNone
authorWilliam Turner
requires_python
licenseLGPLv3+
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            pyxlsb
======

|PyPI|

``pyxlsb`` is an Excel 2007-2010 Binary Workbook (xlsb) parser for
Python. The library is currently extremely limited, but functional
enough for basic data extraction.

Install
-------

.. code:: sh

   pip install pyxlsb

Usage
-----

The module exposes an ``open_workbook(name)`` method (similar to Xlrd
and OpenPyXl) for opening XLSB files. The Workbook object representing
the file is returned.

.. code:: python

   from pyxlsb import open_workbook
   with open_workbook('Book1.xlsb') as wb:
       # Do stuff with wb

The Workbook object exposes a ``get_sheet(idx)`` method for retrieving a
Worksheet instance.

.. code:: python

   # Using the sheet index (1-based)
   with wb.get_sheet(1) as sheet:
       # Do stuff with sheet

   # Using the sheet name
   with wb.get_sheet('Sheet1') as sheet:
       # Do stuff with sheet

Tip: A ``sheets`` property containing the sheet names is available on
the Workbook instance.

The ``rows()`` method will hand out an iterator to read the worksheet
rows.

.. code:: python

   # You can use .rows(sparse=True) to skip empty rows
   for row in sheet.rows():
       print(row)
   # [Cell(r=0, c=0, v='TEXT'), Cell(r=0, c=1, v=42.1337)]

Do note that dates will appear as floats. You must use the
``convert_date(date)`` method from the ``pyxlsb`` module to turn them
into ``datetime`` instances.

.. code:: python

   from pyxlsb import convert_date
   print(convert_date(41235.45578))
   # datetime.datetime(2012, 11, 22, 10, 56, 19)

.. |PyPI| image:: https://img.shields.io/pypi/v/pyxlsb.svg
   :target: https://pypi.python.org/pypi/pyxlsb



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/willtrnr/pyxlsb",
    "name": "pyxlsb",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "William Turner",
    "author_email": "willtur.will@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3f/13/eebaeb7a40b062d1c6f7f91d09e73d30a69e33e4baa7cbe4b7658548b1cd/pyxlsb-1.0.10.tar.gz",
    "platform": null,
    "description": "pyxlsb\n======\n\n|PyPI|\n\n``pyxlsb`` is an Excel 2007-2010 Binary Workbook (xlsb) parser for\nPython. The library is currently extremely limited, but functional\nenough for basic data extraction.\n\nInstall\n-------\n\n.. code:: sh\n\n   pip install pyxlsb\n\nUsage\n-----\n\nThe module exposes an ``open_workbook(name)`` method (similar to Xlrd\nand OpenPyXl) for opening XLSB files. The Workbook object representing\nthe file is returned.\n\n.. code:: python\n\n   from pyxlsb import open_workbook\n   with open_workbook('Book1.xlsb') as wb:\n       # Do stuff with wb\n\nThe Workbook object exposes a ``get_sheet(idx)`` method for retrieving a\nWorksheet instance.\n\n.. code:: python\n\n   # Using the sheet index (1-based)\n   with wb.get_sheet(1) as sheet:\n       # Do stuff with sheet\n\n   # Using the sheet name\n   with wb.get_sheet('Sheet1') as sheet:\n       # Do stuff with sheet\n\nTip: A ``sheets`` property containing the sheet names is available on\nthe Workbook instance.\n\nThe ``rows()`` method will hand out an iterator to read the worksheet\nrows.\n\n.. code:: python\n\n   # You can use .rows(sparse=True) to skip empty rows\n   for row in sheet.rows():\n       print(row)\n   # [Cell(r=0, c=0, v='TEXT'), Cell(r=0, c=1, v=42.1337)]\n\nDo note that dates will appear as floats. You must use the\n``convert_date(date)`` method from the ``pyxlsb`` module to turn them\ninto ``datetime`` instances.\n\n.. code:: python\n\n   from pyxlsb import convert_date\n   print(convert_date(41235.45578))\n   # datetime.datetime(2012, 11, 22, 10, 56, 19)\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/pyxlsb.svg\n   :target: https://pypi.python.org/pypi/pyxlsb\n\n\n",
    "bugtrack_url": null,
    "license": "LGPLv3+",
    "summary": "Excel 2007-2010 Binary Workbook (xlsb) parser",
    "version": "1.0.10",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7e92345823838ae367c59b63e03aef9c331f485370f9df6d049256a61a28f06d",
                "md5": "5002b1a44372e94d719284cbc9ec10b7",
                "sha256": "87c122a9a622e35ca5e741d2e541201d28af00fb46bec492cfa9586890b120b4"
            },
            "downloads": -1,
            "filename": "pyxlsb-1.0.10-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5002b1a44372e94d719284cbc9ec10b7",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 23849,
            "upload_time": "2022-10-14T19:17:46",
            "upload_time_iso_8601": "2022-10-14T19:17:46.079407Z",
            "url": "https://files.pythonhosted.org/packages/7e/92/345823838ae367c59b63e03aef9c331f485370f9df6d049256a61a28f06d/pyxlsb-1.0.10-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f13eebaeb7a40b062d1c6f7f91d09e73d30a69e33e4baa7cbe4b7658548b1cd",
                "md5": "e5d1117c2c5fffc9fdc872f0b7ea18a1",
                "sha256": "8062d1ea8626d3f1980e8b1cfe91a4483747449242ecb61013bc2df85435f685"
            },
            "downloads": -1,
            "filename": "pyxlsb-1.0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "e5d1117c2c5fffc9fdc872f0b7ea18a1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 22424,
            "upload_time": "2022-10-14T19:17:47",
            "upload_time_iso_8601": "2022-10-14T19:17:47.308413Z",
            "url": "https://files.pythonhosted.org/packages/3f/13/eebaeb7a40b062d1c6f7f91d09e73d30a69e33e4baa7cbe4b7658548b1cd/pyxlsb-1.0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-10-14 19:17:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "willtrnr",
    "github_project": "pyxlsb",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyxlsb"
}
        
Elapsed time: 0.06277s