Skip to main content

A simple python tool to extract sets and parameters from excel files by creating GDX files for GAMS

Project description

Excel to gdx

A simple python tool to extract sets and parameters from excel files by creating GDX files for GAMS

See sheet name 'py' in the excel files that describes sets and parameters settings. Similar approach for https://www.gams.com/latest/docs/T_GDXXRW.html

Particularly useful for linux and ios where GDXXRW.exe is not compatible, see here: https://forum.gamsworld.org/viewtopic.php?t=10418#p24019

NEW FEATURE (v0.0.5): +INF, -INF, EPS

Required library:

  • gdxpds
  • pandas
  • numpy
  • openpyxl
  • GAMS API for python

Installation

pip install exceltogdx

Delete

 pip uninstall exceltogdx

See notebook example.ipynb and download the excel file test.xlsx

from exceltogdx import exceltogdx
frames = exceltogdx('test.xlsx','test.gdx')

Repository: https://github.com/diw-berlin/exceltogdx

If you find and error in the code, please raise an issue or solve it by pushing a commit.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

exceltogdx-0.0.5-py2.py3-none-any.whl (6.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file exceltogdx-0.0.5-py2.py3-none-any.whl.

File metadata

  • Download URL: exceltogdx-0.0.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for exceltogdx-0.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 db2a7bce2785f232e51209b090d08475d0e28017fd187c4796ccbe7abb7be24d
MD5 4108c76d09e34316a5dea1df07ce20c0
BLAKE2b-256 7edc4c555679150feaa2d0247ac3b2b07eb70ecdd118e09d5e6366f7cd502e9e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page