Skip to main content

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

NEW FEATURE (v0.0.6): gams_dir as new argument.

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', gams_dir=None)

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.

Release files for exceltogdx 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for exceltogdx 0.0.6
File Size Uploaded
exceltogdx-0.0.6.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for exceltogdx 0.0.6
File Interpreter ABI Platform
exceltogdx-0.0.6-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 12.0 kB

Release files / exceltogdx-0.0.6.tar.gz

Download URL exceltogdx-0.0.6.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
119f5b66c5626fc0b511bbff3b7f5a5b2e2dea24f0a1ca812caa558bc27e53ab
BLAKE2b-256 checksum
How to use checksums
e595e770b0985824953113094baa0c188aa4d1381a0d5100d8dcc934c08ec290
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / exceltogdx-0.0.6-py2.py3-none-any.whl

Download URL exceltogdx-0.0.6-py2.py3-none-any.whl
Size 6.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e5cf8aec1e7d4d5a5241e5bf898509ba27144457acce7e6a84a23d102e142f2a
BLAKE2b-256 checksum
How to use checksums
dcb93f98fba47f4b544b2bba0207076772188e175c876b7bd46a4dd0ebac917a
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page