{ "info": { "author": "Gabriel S. Gusmao", "author_email": "gusmaogabriels@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "|star| |watch| |fork| |github|\r\n\r\n.. image:: https://img.shields.io/pypi/l/xl2py.svg\r\n :height: 100px\r\n :width: 200 px\r\n :scale: 50 %\r\n :alt: alternate text\r\n :align: right\r\n\r\n\r\n.. image:: https://img.shields.io/pypi/v/xl2py.svg\r\n :height: 100px\r\n :width: 200 px\r\n :scale: 50 %\r\n :alt: alternate text\r\n :align: right\r\n\r\nAn Excel (XL) 2 Python (Py) structure retriever for optimization. Convert the I/O of XL files into Python.\r\n\r\n|ld|\r\n\r\n|rg|\r\n\r\n----------------\r\n**Description**\r\n----------------\r\n\r\n*Convert an XL structure to Py and use any optimization algorithm of your will* \r\n\r\n*Now, with object-oriented formulas*\r\n\r\nThe current project makes use of the XL COM interface (win32com library) to:\r\n\r\n 1. Read an objective function cell\r\n 2. Recursively build its dependent structure as of its formula\r\n * The XL structure is represented in Py as a dict() object\r\n * The structure is referenced to as: \r\n * `dictobj[Workbook number as int][Worksheet number as int][Row as int][Column as int]`\r\n * Whereby it handles:\r\n * multi-XL workbook/worksheet references\r\n * single worksheet multirange retrieval\r\n 3. XL cell formulas are translated to **object oriented** calculation blocks (no more `evals` as of this update).\r\n 4. The calculation structure is determinded by cell-dependency trees, which have been already stored during the conversion (2)\r\n - Handling of circular references\r\n \r\n Ongoing development: A simple evolutionary algorithm that runs based off the abovementioned structure.\r\n\r\n----------------\r\n**Features**\r\n----------------\r\n\r\n - **Conversion Library**\r\n\r\n The following XL functions can be currently handled by xl2py.\r\n xl2py is capable of undertaking **single-cells**, **arrays** and **array/matrix operations**\r\n\r\n 1. Standard operators: \\+, \\-, \\/, \\*, \\^\r\n 2. Logical operators: \\<, \\>, \\<=, \\>=, \\<>, \\=\r\n 3. IF\r\n 4. AVERAGE\r\n 5. STDEV.P\r\n 6. TRANSPOSE\r\n 7. ABS\r\n 8. MMULT\r\n 9. IFERROR\r\n 10. SUM\r\n 11. COUNT\r\n 12. SQRT\r\n\r\n------------------------------------------------\r\n**Tackled in the latest update**\r\n------------------------------------------------\r\n\r\n\t1. No more `evals` -> formulas are object oriented (Calculation-, Formula- and Reference- and Numeric-Blocks)\r\n\t2. by-operand handling\r\n\t *Over the latest update development, by-operand handling of formulas took place of RPN (reverse-polish notation). For additional details, viz. github repository*\r\n\r\n----------------\r\n**On the way**\r\n----------------\r\n\r\n 1. Object serialization\r\n 2. CVS outputs\r\n 3. A conceptual example with corresponding XL file. (*reach me for further assistance*)\r\n\r\n----------------\r\n**Instructions**\r\n----------------\r\n\r\n - **Installation**\r\n\r\n .. code-block:: python\r\n\r\n pip install xl2py==version_no\r\n\r\n - **Example**: I/O object creation\r\n\r\n .. code-block:: python\r\n \r\n import xl2py \r\n \r\n Builder = xl2py.builder() # creates a xl2py builder object\r\n # place the path of your XL file \r\n path = r'C:\\\\User\\\\DEFAULT\\\\WHATEVER\\\\...' \r\n # define your XL file password (if it exists)\r\n pwd = 'password' \r\n # opens up a XL COM interface and attach it to the Builder object\r\n Builder.connect_com(path,pwd) \r\n # declare your input cell/range references\r\n inputs = xl2py.xlref(, \\\r\n , )\r\n # inputs include other inputs to the xlref object\r\n inputs += xl2py.xlref(, , )\r\n # output must be a single cell reference\r\n output = xl2py.xlref(, , ) \r\n # Now you are all set. You shall translate the XL structure to python.\r\n Builder.set_structure(inputs,output)\r\n # If you want to change the input cell/range values...\r\n # vals must be of the shape of the inputs \r\n # and must be parsed as a list of lists or numpy arrays\r\n Builder.set_input_values(vals) \r\n # grab the output (objective fun) value as numpy array\r\n output_val = Builder.get_output_value() # Grab the new output value\r\n\r\nYou can find me @ Gabriel S. Gusm\u00e3o \r\n\r\n - https://www.researchgate.net/profile/Gabriel_Gusmao\r\n - https://github.com/gusmaogabriels\r\n\r\n.. |github| image:: https://img.shields.io/github/followers/gusmaogabriels.svg?style=social&label=Follow\r\n :scale: 25%\r\n :target: https://github.com/gusmaogabriels\r\n\r\n.. |fork| image:: https://img.shields.io/github/forks/gusmaogabriels/xl2py.svg?style=social&label=Fork\r\n :scale: 25%\r\n :target: https://github.com/gusmaogabriels/xl2py/fork\r\n\r\n.. |star| image:: https://img.shields.io/github/stars/gusmaogabriels/xl2py.svg?style=social&label=Star\r\n :scale: 25%\r\n :target: https://github.com/gusmaogabriels/xl2py/stargazers\r\n\r\n.. |watch| image:: https://img.shields.io/github/watchers/gusmaogabriels/xl2py.svg?style=social&label=Watch\r\n :scale: 25%\r\n :target: https://github.com/gusmaogabriels/xl2py/watchers\r\n\r\n.. |rg| image:: https://www.researchgate.net/images/public/profile_share_badge.png\r\n :height: 55 px\r\n :width: 166 px\r\n :scale: 30 %\r\n :target: https://www.researchgate.net/profile/Gabriel_Gusmao?cp=shp\r\n\r\n.. |ld| image:: https://static.licdn.com/scds/common/u/img/webpromo/btn_viewmy_160x25.png\r\n :height: 25 px\r\n :width: 160 px\r\n :scale: 50 %\r\n :target: https://br.linkedin.com/pub/gabriel-saben%C3%A7a-gusm%C3%A3o/115/aa6/aa8", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/gusmaogabriels/xl2py/tarball/v2.0b", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gusmaogabriels/xl2py", "keywords": "python,excel,com,solver,optmization,minimization,evolutionary,stochastic", "license": "The MIT License (MIT)", "maintainer": "Gabriel Saben\u00e7a Gusm\u00e3o", "maintainer_email": "gusmaogabriels@gmail.com", "name": "xl2py", "package_url": "https://pypi.org/project/xl2py/", "platform": "Python 2.7+", "project_url": "https://pypi.org/project/xl2py/", "project_urls": { "Download": "https://github.com/gusmaogabriels/xl2py/tarball/v2.0b", "Homepage": "https://github.com/gusmaogabriels/xl2py" }, "release_url": "https://pypi.org/project/xl2py/2.0b/", "requires_dist": null, "requires_python": null, "summary": "An Excel (XL) 2 Python (Py) structure retriever for optimization. Convert the I/O of XL files into Python.", "version": "2.0b" }, "last_serial": 2162576, "releases": { "1.0.3b": [ { "comment_text": "", "digests": { "md5": "3a7c1eb83a2eba6d529f7556e082ea2f", "sha256": "fc4d51d23d47930a8b30543eb0313db66014a15477ccefc49cbadb5d73cdf968" }, "downloads": -1, "filename": "xl2py-1.0.3b.zip", "has_sig": false, "md5_digest": "3a7c1eb83a2eba6d529f7556e082ea2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20156, "upload_time": "2015-10-08T04:07:35", "url": "https://files.pythonhosted.org/packages/a1/e9/450f80376fc314b0221bcf7a099c6ac9f897efa6c3b70b7d38937a460086/xl2py-1.0.3b.zip" } ], "1.0.4b": [ { "comment_text": "", "digests": { "md5": "d64133f295bac7244701f1748cf9cb15", "sha256": "e3f8274173a8e26a69ebe51cbd3e82d4d184579e7f748c287e34a66cbc5ca5bf" }, "downloads": -1, "filename": "xl2py-1.0.4b.zip", "has_sig": false, "md5_digest": "d64133f295bac7244701f1748cf9cb15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20374, "upload_time": "2015-10-08T04:23:27", "url": "https://files.pythonhosted.org/packages/8b/5d/77797e951b31a5877343f646a002efd92d830273296eff1ee524b4496de8/xl2py-1.0.4b.zip" } ], "2.0b": [] }, "urls": [] }