# excelstyler
`excelstyler` is a Python package that makes it easy to style and format Excel worksheets using [openpyxl](https://openpyxl.readthedocs.io).
## Installation
```bash
pip install excelstyler
```
## Example
```python
from excelstyler.styles import GREEN_CELL
from excelstyler.utils import shamsi_date
from excelstyler.headers import create_header
import openpyxl
output = BytesIO()
workbook = Workbook()
worksheet = workbook.active
worksheet.sheet_view.rightToLeft = True # if you iranian else False
worksheet.insert_rows(1)
create_header(ws, ["Name", "Score"], 1, 1, color='green')
workbook.save(output)
output.seek(0)
response = HttpResponse(
content_type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
response[
'Content-Disposition'] = f'attachment; filename="test file.xlsx"'.encode(
'utf-8') # support from persian
response.write(output.getvalue())
return response
```
## License
MIT
Raw data
{
"_id": null,
"home_page": null,
"name": "excelstyler",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "excel, openpyxl, spreadsheet, styling, xlsx",
"author": null,
"author_email": "Nima Orangi <7nimor@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/db/f5/7c7e91b1bb647c9545f2e3f50150dec89b8f39457a1cde5dd67b3316158c/excelstyler-0.1.0.tar.gz",
"platform": null,
"description": "# excelstyler\n\n`excelstyler` is a Python package that makes it easy to style and format Excel worksheets using [openpyxl](https://openpyxl.readthedocs.io).\n\n## Installation\n```bash\npip install excelstyler\n```\n\n## Example\n```python\nfrom excelstyler.styles import GREEN_CELL\nfrom excelstyler.utils import shamsi_date\nfrom excelstyler.headers import create_header\n\nimport openpyxl\n\noutput = BytesIO()\nworkbook = Workbook()\nworksheet = workbook.active\nworksheet.sheet_view.rightToLeft = True # if you iranian else False\nworksheet.insert_rows(1)\ncreate_header(ws, [\"Name\", \"Score\"], 1, 1, color='green')\nworkbook.save(output)\noutput.seek(0)\n\nresponse = HttpResponse(\n content_type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')\nresponse[\n 'Content-Disposition'] = f'attachment; filename=\"test file.xlsx\"'.encode(\n 'utf-8') # support from persian\nresponse.write(output.getvalue())\nreturn response\n```\n\n## License\nMIT\n",
"bugtrack_url": null,
"license": "GNU AFFERO GENERAL PUBLIC LICENSE Version 1, 13 august 2025 Copyright (C) 2025 Nima Orangi This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.",
"summary": "Style and format Excel files easily with openpyxl",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/7nimor/excelstyler"
},
"split_keywords": [
"excel",
" openpyxl",
" spreadsheet",
" styling",
" xlsx"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7291d771e74f12fbff4b0164c532a06626105e5fd886fa3174deadd5c14ef919",
"md5": "804f0cbbfd41ccc6b1c358372a13e82d",
"sha256": "d05c35ed06dbfea080409c68c46b63fcb409d4359cb02d7d7a581bdfab1d79bf"
},
"downloads": -1,
"filename": "excelstyler-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "804f0cbbfd41ccc6b1c358372a13e82d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 9856,
"upload_time": "2025-08-13T18:45:47",
"upload_time_iso_8601": "2025-08-13T18:45:47.446278Z",
"url": "https://files.pythonhosted.org/packages/72/91/d771e74f12fbff4b0164c532a06626105e5fd886fa3174deadd5c14ef919/excelstyler-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dbf57c7e91b1bb647c9545f2e3f50150dec89b8f39457a1cde5dd67b3316158c",
"md5": "5b9ab7aeac8708cb42d830a357714aa5",
"sha256": "75898df9ba332d4b5a9528a03c980fa630f56fee27a714bd8528712f353ad5ef"
},
"downloads": -1,
"filename": "excelstyler-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "5b9ab7aeac8708cb42d830a357714aa5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 10141,
"upload_time": "2025-08-13T18:45:49",
"upload_time_iso_8601": "2025-08-13T18:45:49.280219Z",
"url": "https://files.pythonhosted.org/packages/db/f5/7c7e91b1bb647c9545f2e3f50150dec89b8f39457a1cde5dd67b3316158c/excelstyler-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-13 18:45:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "7nimor",
"github_project": "excelstyler",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "excelstyler"
}