Skip to main content

Runs an Excel model (.xlsx) with parameters

Project description

excel-model-runner

This tool will take an Excel model (.xlsx), update any parameters as defined in the parameters file and calculate all cells, resulting in an Excel spreadsheet resembling the original, but with all formula cells replaced by the calculated values.

The parameter file can be either JSON file or a CSV file in the following format:


Config file

JSON:

{
   "Sheet name.Cell1": "Replacement value string",
   "Sheet name.Cell2": Replacement value float
}

Example: params.json

{
    "Variables.C2": "red",
    "Variables.C3": 0.8
}


CSV:

Sheet name.Cell1,Replacement value string
Sheet name.Cell2,Replacement value float

Example: params.csv

Variables.C2,red
Variables.C3,0.8

NOTE: Do NOT include a header row in the CSV



Usage:

usage: run-excel-model [-h] [--output_dir OUTPUT_DIR] [--run_dir RUN_DIR] source_file parameter_file

positional arguments:
  source_file           Excel (xlsx) file that contains
  parameter_file        Path to json or csv parameter file

optional arguments:
  -h, --help            show this help message and exit
  --output_dir OUTPUT_DIR
                        Optional output location. (Default: output)
  --run_dir RUN_DIR     Optional directory to store intermediate files. (Default: runs)

Project details


Download files

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

Source Distribution

excel-model-runner-0.1.0.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

excel_model_runner-0.1.0-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

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