{ "info": { "author": "Kevin Wang, Kevin Zhang", "author_email": "kevin+pyexcelerate@kevinzhang.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "PyExcelerate\n============\n\nAccelerated Excel XLSX writing library for Python\n\nmaster: |build-status-master| dev: |build-status-dev| test coverage:\n|coverage-status|\n\n- Authors: `Kevin Wang `__ and `Kevin\n Zhang `__\n- Copyright 2015 Kevin Wang, Kevin Zhang. Portions copyright Google,\n Inc.\n- License: Simplified BSD License\n- `Source repository `__\n- `PyPI page `__\n\nDescription\n-----------\n\nPyExcelerate is a Python for writing Excel-compatible XLSX spreadsheet\nfiles, with an emphasis on speed.\n\nBenchmarks\n~~~~~~~~~~\n\n| Benchmark code located in pyexcelerate/tests/benchmark.py\n| Ubuntu 12.04 LTS, Core i5-3450, 8GB DDR3, Python 2.7.3\n\n::\n\n\n | TEST_NAME | NUM_ROWS | NUM_COLS | TIME_IN_SECONDS |\n |-----------------------------|----------|----------|-----------------|\n | pyexcelerate value fastest | 1000 | 100 | 0.47 |\n | pyexcelerate value faster | 1000 | 100 | 0.51 |\n | pyexcelerate value fast | 1000 | 100 | 1.53 |\n | xlsxwriter value | 1000 | 100 | 0.84 |\n | openpyxl | 1000 | 100 | 2.74 |\n | pyexcelerate style cheating | 1000 | 100 | 1.23 |\n | pyexcelerate style fastest | 1000 | 100 | 2.40 |\n | pyexcelerate style faster | 1000 | 100 | 2.75 |\n | pyexcelerate style fast | 1000 | 100 | 6.15 |\n | xlsxwriter style cheating | 1000 | 100 | 1.21 |\n | xlsxwriter style | 1000 | 100 | 4.85 |\n | openpyxl | 1000 | 100 | 6.32 |\n\n * cheating refers to pregeneration of styles\n\nInstallation\n------------\n\nPyExcelerate is supported on Python 2.6, 2.7, 3.3, 3,4, and 3.5.\n\n::\n\n pip install pyexcelerate\n\nUsage\n-----\n\nWriting bulk data\n~~~~~~~~~~~~~~~~~\n\nFastest\n^^^^^^^\n\n::\n\n from pyexcelerate import Workbook\n\n data = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] # data is a 2D array\n\n wb = Workbook()\n wb.new_sheet(\"sheet name\", data=data)\n wb.save(\"output.xlsx\")\n\nWriting bulk data to a range\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPyExcelerate also permits you to write data to ranges directly, which is\nfaster than writing cell-by-cell.\n\nFastest\n^^^^^^^\n\n::\n\n from pyexcelerate import Workbook\n\n wb = Workbook()\n ws = wb.new_sheet(\"test\")\n ws.range(\"B2\", \"C3\").value = [[1, 2], [3, 4]]\n wb.save(\"output.xlsx\")\n\nWriting cell data\n~~~~~~~~~~~~~~~~~\n\nFaster\n^^^^^^\n\n::\n\n from datetime import datetime\n from pyexcelerate import Workbook\n\n wb = Workbook()\n ws = wb.new_sheet(\"sheet name\")\n ws.set_cell_value(1, 1, 15) # a number\n ws.set_cell_value(1, 2, 20)\n ws.set_cell_value(1, 3, \"=SUM(A1,B1)\") # a formula\n ws.set_cell_value(1, 4, datetime.now()) # a date\n wb.save(\"output.xlsx\")\n\nFast\n^^^^\n\n::\n\n from datetime import datetime\n from pyexcelerate import Workbook\n\n wb = Workbook()\n ws = wb.new_sheet(\"sheet name\")\n ws[1][1].value = 15 # a number\n ws[1][2].value = 20\n ws[1][3].value = \"=SUM(A1,B1)\" # a formula\n ws[1][4].value = datetime.now() # a date\n wb.save(\"output.xlsx\")\n\nSelecting cells by name\n~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n from pyexcelerate import Workbook\n\n wb = Workbook()\n ws = wb.new_sheet(\"sheet name\")\n ws.cell(\"A1\").value = 12\n wb.save(\"output.xlsx\")\n\nMerging cells\n~~~~~~~~~~~~~\n\n::\n\n from pyexcelerate import Workbook\n\n wb = Workbook()\n ws = wb.new_sheet(\"sheet name\")\n ws[1][1].value = 15\n ws.range(\"A1\", \"B1\").merge()\n wb.save(\"output.xlsx\")\n\nStyling cells\n~~~~~~~~~~~~~\n\nStyling cells causes **non-negligible** overhead. It **will** increase\nyour execution time (up to 10x longer if done improperly!). Only style\ncells if absolutely necessary.\n\nFastest\n^^^^^^^\n\n::\n\n from pyexcelerate import Workbook, Color, Style, Font, Fill, Format\n from datetime import datetime\n\n wb = Workbook()\n ws = wb.new_sheet(\"sheet name\")\n ws.set_cell_value(1, 1, 1)\n ws.set_cell_style(1, 1, Style(font=Font(bold=True)))\n ws.set_cell_style(1, 1, Style(font=Font(italic=True)))\n ws.set_cell_style(1, 1, Style(font=Font(underline=True)))\n ws.set_cell_style(1, 1, Style(font=Font(strikethrough=True)))\n ws.set_cell_style(1, 1, Style(fill=Fill(background=Color(255,0,0,0))))\n ws.set_cell_value(1, 2, datetime.now())\n ws.set_cell_style(1, 1, Style(format=Format('mm/dd/yy')))\n wb.save(\"output.xlsx\")\n\nFaster\n^^^^^^\n\n::\n\n from pyexcelerate import Workbook, Color\n from datetime import datetime\n\n wb = Workbook()\n ws = wb.new_sheet(\"sheet name\")\n ws.set_cell_value(1, 1, 1)\n ws.get_cell_style(1, 1).font.bold = True\n ws.get_cell_style(1, 1).font.italic = True\n ws.get_cell_style(1, 1).font.underline = True\n ws.get_cell_style(1, 1).font.strikethrough = True\n ws.get_cell_style(1, 1).fill.background = Color(0, 255, 0, 0)\n ws.set_cell_value(1, 2, datetime.now())\n ws.get_cell_style(1, 1).format.format = 'mm/dd/yy'\n wb.save(\"output.xlsx\")\n\nFast\n^^^^\n\n::\n\n from pyexcelerate import Workbook, Color\n from datetime import datetime\n\n wb = Workbook()\n ws = wb.new_sheet(\"sheet name\")\n ws[1][1].value = 1\n ws[1][1].style.font.bold = True\n ws[1][1].style.font.italic = True\n ws[1][1].style.font.underline = True\n ws[1][1].style.font.strikethrough = True\n ws[1][1].style.fill.background = Color(0, 255, 0, 0)\n ws[1][2].value = datetime.now()\n ws[1][2].style.format.format = 'mm/dd/yy'\n wb.save(\"output.xlsx\")\n\n**Note** that ``.style.format.format``'s repetition is due to planned\nsupport for conditional formatting and other related features. The\nformatting syntax may be improved in the future.\n\nStyling ranges\n~~~~~~~~~~~~~~\n\n::\n\n from pyexcelerate import Workbook, Color\n from datetime import datetime\n\n wb = Workbook()\n ws = wb.new_sheet(\"test\")\n ws.range(\"A1\",\"C3\").value = 1\n ws.range(\"A1\",\"C1\").style.font.bold = True\n ws.range(\"A2\",\"C3\").style.font.italic = True\n ws.range(\"A3\",\"C3\").style.fill.background = Color(255, 0, 0, 0)\n ws.range(\"C1\",\"C3\").style.font.strikethrough = True\n\nStyling rows\n~~~~~~~~~~~~\n\nA simpler (and faster) way to style an entire row.\n\nFastest\n^^^^^^^\n\n::\n\n from pyexcelerate import Workbook, Color, Style, Fill\n from datetime import datetime\n\n wb = Workbook()\n ws = wb.new_sheet(\"sheet name\")\n ws.set_row_style(1, Style(fill=Fill(background=Color(255,0,0,0))))\n wb.save(\"output.xlsx\")\n\nFaster\n^^^^^^\n\n::\n\n from pyexcelerate import Workbook, Color\n from datetime import datetime\n\n wb = Workbook()\n ws = wb.new_sheet(\"sheet name\")\n ws.get_row_style(1).fill.background = Color(255, 0, 0)\n wb.save(\"output.xlsx\")\n\nFast\n^^^^\n\n::\n\n from pyexcelerate import Workbook, Color\n from datetime import datetime\n\n wb = Workbook()\n ws = wb.new_sheet(\"sheet name\")\n ws[1].style.fill.background = Color(255, 0, 0)\n wb.save(\"output.xlsx\")\n\nStyling columns\n~~~~~~~~~~~~~~~\n\nFastest\n^^^^^^^\n\n::\n\n from pyexcelerate import Workbook, Color, Style, Fill\n from datetime import datetime\n\n wb = Workbook()\n ws = wb.new_sheet(\"sheet name\")\n ws.set_col_style(1, Style(fill=Fill(background=Color(255,0,0,0))))\n wb.save(\"output.xlsx\")\n\nAvailable style attributes\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nConsistent with the implementation patterns above, the following style\nparameters are available:\n\n::\n\n ws[1][1].style.font.bold = True\n ws[1][1].style.font.italic = True\n ws[1][1].style.font.underline = True\n ws[1][1].style.font.strikethrough = True\n ws[1][1].style.font.color = Color(255, 0, 255)\n ws[1][1].style.fill.background = Color(0, 255, 0)\n ws[1][1].style.alignment.vertical = 'top'\n ws[1][1].style.alignment.horizontal = 'right'\n ws[1][1].style.alignment.rotation = 90\n ws[1][1].style.alignment.wrap_text = True\n ws[1][1].style.borders.top.color = Color(255, 0, 0)\n ws[1][1].style.borders.right.style = '-.'\n\nEach attribute also has constructors for implementing via\n``set_cell_style()``.\n\nThe following border styles are available: ``.-``, ``..-``, ``--``,\n``..``, ``=``, ``.``, ``medium -.``, ``medium -..``, ``medium --``,\n``/-.``, ``_``\n\nSetting row heights and column widths\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nRow heights and column widths are set using the ``size`` attribute in\n``Style``. Appropriate values are: \\* ``-1`` for auto-fit \\* ``0`` for\nhidden \\* Any other value for the appropriate size.\n\nFor example, to hide column B:\n\n::\n\n from pyexcelerate import Workbook, Color, Style, Fill\n from datetime import datetime\n\n wb = Workbook()\n ws = wb.new_sheet(\"sheet name\")\n ws.set_col_style(2, Style(size=0))\n wb.save(\"output.xlsx\")\n\nLinked styles\n~~~~~~~~~~~~~\n\nPyExcelerate supports using style objects instead manually setting each\nattribute as well. This permits you to modify the style at a later time.\n\n::\n\n from pyexcelerate import Workbook, Font\n\n wb = Workbook()\n ws = wb.new_sheet(\"sheet name\")\n ws[1][1].value = 1\n font = Font(bold=True, italic=True, underline=True, strikethrough=True)\n ws[1][1].style.font = font\n wb.save(\"output.xlsx\")\n\nPackaging with PyInstaller\n--------------------------\n\nPyInstaller is the only packager officially supported by PyExcelerate.\nCopy hook-pyexcelerate.Writer.py to your PyInstaller hooks directory.\n\nSupport\n-------\n\nPlease use the GitHub Issue Tracker and pull request system to report\nbugs/issues and submit improvements/changes, respectively. **Pull\nrequests *must* be based against the dev branch - if not, we will reject the PR\nand ask you to rebase against the correct branch.** All nontrivial\nchanges to code should be accompanied by a test when appropriate. We use\nthe Nose testing framework.\n\n.. |build-status-master| image:: https://travis-ci.org/kz26/PyExcelerate.png?branch=master\n :target: https://travis-ci.org/kz26/PyExcelerate\n.. |build-status-dev| image:: https://travis-ci.org/kz26/PyExcelerate.png?branch=dev\n :target: https://travis-ci.org/kz26/PyExcelerate\n.. |coverage-status| image:: https://coveralls.io/repos/kz26/PyExcelerate/badge.png\n :target: https://coveralls.io/r/kz26/PyExcelerate\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kz26/PyExcelerate", "keywords": "", "license": "", "maintainer": "Kevin Zhang", "maintainer_email": "kevin+pyexcelerate@kevinzhang.me", "name": "PyExcelerate", "package_url": "https://pypi.org/project/PyExcelerate/", "platform": "", "project_url": "https://pypi.org/project/PyExcelerate/", "project_urls": { "Homepage": "https://github.com/kz26/PyExcelerate" }, "release_url": "https://pypi.org/project/PyExcelerate/0.8.0/", "requires_dist": [ "Jinja2", "six (>=1.4.0)" ], "requires_python": "", "summary": "Accelerated Excel XLSX Writing Library for Python 2/3", "version": "0.8.0" }, "last_serial": 5226026, "releases": { "0.6.7": [ { "comment_text": "", "digests": { "md5": "fb4ed28a7c54438b11691ecea485e961", "sha256": "5de6053a388386a490285e522f5ee27a72b049774b705b1e0c2c27434c0804d1" }, "downloads": -1, "filename": "PyExcelerate-0.6.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fb4ed28a7c54438b11691ecea485e961", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 28625, "upload_time": "2016-05-21T22:58:07", "url": "https://files.pythonhosted.org/packages/09/33/f9b9fa31753afb5a8a9586d4f4098e3695bbdb0cfbf7294d055f5559a5bd/PyExcelerate-0.6.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2b35f875213bb1dc21b1290c387dafe3", "sha256": "21ff4c3bea9a339eca8b80a01676d4114a4d8636e0454c641084c66ca14265c7" }, "downloads": -1, "filename": "PyExcelerate-0.6.7.tar.bz2", "has_sig": false, "md5_digest": "2b35f875213bb1dc21b1290c387dafe3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19209, "upload_time": "2016-05-21T23:04:18", "url": "https://files.pythonhosted.org/packages/12/e8/223d6789805c20a3efcadecc869e539fed25405534d862f20d4aeacb34a1/PyExcelerate-0.6.7.tar.bz2" }, { "comment_text": "", "digests": { "md5": "9ae462b67e9c61458d471d080ba92434", "sha256": "cd74488a71c47bc598767cab310cb8b1b92b9bd5d06da55f74ea943654f419c5" }, "downloads": -1, "filename": "PyExcelerate-0.6.7.zip", "has_sig": false, "md5_digest": "9ae462b67e9c61458d471d080ba92434", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36894, "upload_time": "2016-05-21T23:04:45", "url": "https://files.pythonhosted.org/packages/14/f1/6e569cc9496ba534fa62b99400c3f9b075c29fc1057766a82ae708364bfc/PyExcelerate-0.6.7.zip" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "da0a21b33335ea1ade004e5471556002", "sha256": "5222dadcfe21f613d0f59aa9009057b4ab241ca7c8d93ae731c8aa51d9845689" }, "downloads": -1, "filename": "PyExcelerate-0.7.0.tar.gz", "has_sig": false, "md5_digest": "da0a21b33335ea1ade004e5471556002", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22886, "upload_time": "2016-07-28T17:55:32", "url": "https://files.pythonhosted.org/packages/d0/eb/d3e097daa1d0e284a8fd8c9701b365beda75635bb2ca4cc9c20ed6726aaa/PyExcelerate-0.7.0.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "97d0a5027fda44388f52bc4c3bf8ed17", "sha256": "531fd47163ad4fb85c141d5eac640e1d5d237c33d4e30f9b0530d84b2edadc28" }, "downloads": -1, "filename": "PyExcelerate-0.7.1.tar.gz", "has_sig": false, "md5_digest": "97d0a5027fda44388f52bc4c3bf8ed17", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22964, "upload_time": "2016-08-05T21:53:23", "url": "https://files.pythonhosted.org/packages/5b/e4/5004428759ad95201042be716d20ee2cae4e1f7b093f621efac5e46ee215/PyExcelerate-0.7.1.tar.gz" } ], "0.7.2": [ { "comment_text": "", "digests": { "md5": "e5a466fe97617017a6cbcce7df6e256f", "sha256": "8471475d0294e21a7945782f52874c0baa0b1889808ea065178d49350bdacdd3" }, "downloads": -1, "filename": "PyExcelerate-0.7.2-py3-none-any.whl", "has_sig": false, "md5_digest": "e5a466fe97617017a6cbcce7df6e256f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 28957, "upload_time": "2017-11-15T19:57:15", "url": "https://files.pythonhosted.org/packages/f1/4a/08ce6ca43a04795b8751ef32b372d323287e8ccfdc457fa9526ff7b5a26a/PyExcelerate-0.7.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3c15ca28faa0050e8b367ec7257b2358", "sha256": "8adecbd7eb0c8e3fb57ef52fe4f10e4b7996fca0a1c7da39a1c069bc4ca56455" }, "downloads": -1, "filename": "PyExcelerate-0.7.2.tar.gz", "has_sig": false, "md5_digest": "3c15ca28faa0050e8b367ec7257b2358", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23527, "upload_time": "2017-11-15T19:57:17", "url": "https://files.pythonhosted.org/packages/f5/0a/11cd90811925d48ae371a07b0af50b655a8c6cf27df96ac76b0097c37c5e/PyExcelerate-0.7.2.tar.gz" } ], "0.7.3": [ { "comment_text": "", "digests": { "md5": "444a1a66da76a369a82ca315a27aa6d1", "sha256": "7212cb135bad05a6c21b7dc86b2dc4b53d0f7c612cc076c05b3855ac6fffa8fe" }, "downloads": -1, "filename": "PyExcelerate-0.7.3-py3-none-any.whl", "has_sig": false, "md5_digest": "444a1a66da76a369a82ca315a27aa6d1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 26306, "upload_time": "2018-06-05T21:55:28", "url": "https://files.pythonhosted.org/packages/e6/51/b45d74de6d1f759a18b33cdaeeecca1c0a452e1f1f8af9126178b453eb38/PyExcelerate-0.7.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6a0fe8675b21702574def6fd1fdd6fe3", "sha256": "bd819a689ad0c43c547dda6a964a316bbf61c9ba67b7491e36a283592303b49e" }, "downloads": -1, "filename": "PyExcelerate-0.7.3.tar.gz", "has_sig": false, "md5_digest": "6a0fe8675b21702574def6fd1fdd6fe3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24293, "upload_time": "2018-06-05T21:55:29", "url": "https://files.pythonhosted.org/packages/a9/23/608a1ed0df057e781e7c53328926ded8975ac096ade986b93461acd26a7c/PyExcelerate-0.7.3.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "b68640ad5b41a7181cb8de7fde1f2560", "sha256": "7396370f5be18c8a2faa49c8eef27825ee6fb3c83690af016323815b2037a515" }, "downloads": -1, "filename": "PyExcelerate-0.8.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b68640ad5b41a7181cb8de7fde1f2560", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 26523, "upload_time": "2019-05-04T16:31:59", "url": "https://files.pythonhosted.org/packages/63/1f/8db5033578c3a783166e193211c8848a3bafc496016198d2ee1f3da5c756/PyExcelerate-0.8.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "37c2fa77875e4ade88a17527026b01bc", "sha256": "84579236e82bf25bd746dd8d11ac9d4eedc4206eda471bc4011aeb7b0b6e1ce4" }, "downloads": -1, "filename": "PyExcelerate-0.8.0.tar.gz", "has_sig": false, "md5_digest": "37c2fa77875e4ade88a17527026b01bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24544, "upload_time": "2019-05-04T16:32:01", "url": "https://files.pythonhosted.org/packages/7e/4d/4fec6ccd792619f80021b851a1653ac5da76ddd21d68c59274a81c439659/PyExcelerate-0.8.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b68640ad5b41a7181cb8de7fde1f2560", "sha256": "7396370f5be18c8a2faa49c8eef27825ee6fb3c83690af016323815b2037a515" }, "downloads": -1, "filename": "PyExcelerate-0.8.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b68640ad5b41a7181cb8de7fde1f2560", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 26523, "upload_time": "2019-05-04T16:31:59", "url": "https://files.pythonhosted.org/packages/63/1f/8db5033578c3a783166e193211c8848a3bafc496016198d2ee1f3da5c756/PyExcelerate-0.8.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "37c2fa77875e4ade88a17527026b01bc", "sha256": "84579236e82bf25bd746dd8d11ac9d4eedc4206eda471bc4011aeb7b0b6e1ce4" }, "downloads": -1, "filename": "PyExcelerate-0.8.0.tar.gz", "has_sig": false, "md5_digest": "37c2fa77875e4ade88a17527026b01bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24544, "upload_time": "2019-05-04T16:32:01", "url": "https://files.pythonhosted.org/packages/7e/4d/4fec6ccd792619f80021b851a1653ac5da76ddd21d68c59274a81c439659/PyExcelerate-0.8.0.tar.gz" } ] }