{ "info": { "author": "Enzo Ruiz Pelaez", "author_email": "enzo.rp.90@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# python_excel2json\n\nA simple way to parse an excel file and get the json that you want.\n\n## Install\n\n```\npip install python_excel2json\n```\n\n## Dependencies\n\n```\nxlrd\n```\n\n## Usage\n\n```\nfrom python_excel2json import parse_excel_to_json\n\n# Step 1: Define the format of your excel that you want to parse.\n\nexcel_sheets_format = {\n 'start_row_sheet_parsing': 1,\n 'start_column_sheet_parsing': 0,\n 'sheet_formats': [\n {\n 'sheet_index': 0,\n 'column_names': [\n {\n 'name': 'name1',\n 'type': 'str'\n },\n {\n 'name': 'name2',\n 'type': 'str'\n },\n {\n 'name': 'name3',\n 'type': 'str'\n },\n {\n 'name': 'name4',\n 'type': 'float'\n }\n ],\n 'is_ordered': True\n },\n {\n 'sheet_index': 1,\n 'column_names': [\n {\n 'name': 'name1',\n 'type': 'str'\n },\n {\n 'name': 'name2',\n 'type': 'str'\n },\n {\n 'name': 'name3',\n 'type': 'str'\n },\n {\n 'name': 'name4',\n 'type': 'float'\n }\n ],\n 'is_ordered': True,\n 'start_row_sheet_parsing': 3,\n 'start_column_sheet_parsing': 5\n }\n ]\n}\n\n# Step 2: Define your excel file input. Using 'xlrd' it can be from two ways:\n\nfile = '/my/path/my-file.xlsx'\nresult = parse_excel_to_json(excel_sheets_format, filename=file)\n\nfile = your-excel-content\nresult = parse_excel_to_json(excel_sheets_format, file_contents=file)\n\n# Step 3: Obtain your specific json result.\n\n[\n {\n 'sheet_index': 0,\n 'results': [\n {\n 'name1': 'value',\n 'name2': 'value',\n 'name3': 'value'\n },\n ...\n ]\n },\n {\n 'sheet_index': 1,\n 'results': [\n {\n 'name1': 'value',\n 'name2': 'value',\n 'name3': 'value',\n 'name4': 'value'\n },\n ...\n ]\n }\n]\n\n```\n\n## License\n\n[MIT](./LICENSE)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/enzoruiz/python_excel2json", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "python-excel2json", "package_url": "https://pypi.org/project/python-excel2json/", "platform": "", "project_url": "https://pypi.org/project/python-excel2json/", "project_urls": { "Homepage": "https://github.com/enzoruiz/python_excel2json" }, "release_url": "https://pypi.org/project/python-excel2json/0.2/", "requires_dist": [ "xlrd" ], "requires_python": "", "summary": "Python Excel to Json", "version": "0.2" }, "last_serial": 5391899, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "f9033ba5bc031528d79c0157e2fa513b", "sha256": "4d22956590173f249e365929f4a1378f791fe5ec0ac09dc5a2f74a2759bd4f78" }, "downloads": -1, "filename": "python_excel2json-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f9033ba5bc031528d79c0157e2fa513b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4261, "upload_time": "2019-05-03T21:26:24", "url": "https://files.pythonhosted.org/packages/bd/ff/b689b03aa415ebef6ff3320b2e075fc0a97657eac136415fa70a7c524328/python_excel2json-0.1-py3-none-any.whl" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "600abcde21265165ba658b9b91ca0d58", "sha256": "8e70e0a20bc336ddaa8ef2c33afe40bac40eaff20fba4bf2c9ac3616e56754f5" }, "downloads": -1, "filename": "python_excel2json-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "600abcde21265165ba658b9b91ca0d58", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4309, "upload_time": "2019-06-12T16:11:42", "url": "https://files.pythonhosted.org/packages/c2/25/a132bdabeeef51f5322e0dd9ee0155fc589a5c2b1527748545320d7cc32e/python_excel2json-0.2-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "600abcde21265165ba658b9b91ca0d58", "sha256": "8e70e0a20bc336ddaa8ef2c33afe40bac40eaff20fba4bf2c9ac3616e56754f5" }, "downloads": -1, "filename": "python_excel2json-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "600abcde21265165ba658b9b91ca0d58", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4309, "upload_time": "2019-06-12T16:11:42", "url": "https://files.pythonhosted.org/packages/c2/25/a132bdabeeef51f5322e0dd9ee0155fc589a5c2b1527748545320d7cc32e/python_excel2json-0.2-py3-none-any.whl" } ] }