Skip to main content

Read excel sheets using a YAML description of the sheet.

Project description

Holeysheet

Python package to read holey sheets (spreadsheets with holes in them).

Install

Start by installing Poetry

  1. poetry install
  2. poetry run python holeysheet/cli.py (Need to have the config file and xls(m/x))

Config file

The config file is expected to be in config.yaml. It should be in the following format:

regions:
  - literals:
      - name: Type
        value: Budget 2022
      - name: Park
        cell: C10
    sheet: Parkmanagement
    header:
      row: 10
      column: C
    regions:
      - range:
          start: G12
          end: Q35
        literals:
          - name: Region
            cell: C12
      - range:
          start: G37
          end: Q60
        literals:
          - name: Region
            cell: C37
      - range:
          start: G64
          end: Q219
        literals:
          - name: Region
            cell: C63

Every region can be seen as a range in the excel file with a given header row and column. Subregions (regions within regions) overwrite top level region information, or inherit it. The first subregion for instance will have more literals, the data will be on a different range, but the header info and sheet info is taken over from the top-level region.

Note: currently expecting there to be a test.xlsm file

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

holeysheet-0.0.1.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

holeysheet-0.0.1-py3-none-any.whl (4.8 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