Skip to main content

Excel Validator

Excel Validator is a Python package designed to validate Excel files (.xlsx) based on configured schemas. The tool ensures your Excel files adhere to specified schemas and generates detailed reports in case of validation errors. Built on the robust Frictionless library, Excel Validator also allows for dynamic schema creation, where fields are included based on row data from other sheets.

Features

  • Validate Excel files against predefined schemas.
  • Generate detailed reports highlighting any validation issues.
  • Dynamic schema creation based on data from other sheets.
  • Easy integration with your existing data processing workflows.
  • Built on top of the Frictionless library for reliable and extensible validation.
  • Integrated webservice for online validation.

Installation

The software requires at least Python version 3.11. It is recommended to create and activate a dedicated conda environment for the installation of this software:

conda create -n excel-validator python=3.11
conda activate excel-validator

Now you can install Excel Validator via pip:

pip install excel-validator

Usage

Once installed, the software can be directly used from the command line interface. Use the --help option to get additional instructions on how to use it:

usage: excel-validator [-h] {validate,configuration,webservice} ...

Three different commands can be used, each with its own options:

  • validate: validates the provided Excel file
  • configuration: creates an initial configuration based on the provided Excel file
  • webservice: starts a web service for online validation of Excel files

Examples

Validation of Excel file:

# validate filename.xlsx using miappe template
excel-validator validate --config miappe filename.xlsx

# validate filename.xlsx using miappe template and show report
excel-validator validate --config miappe --report filename.xlsx

# validate filename.xlsx using miappe template and store report as filename.txt
excel-validator validate --config miappe filename.xlsx --createTextReport

# validate filename.xlsx using custom template in location/configuration/custom
excel-validator validate --config location/configuration/custom filename.xlsx

Create initial validation configuration for Excel file:

# create configuration filename.xlsx and store in location/configuration/initial
excel-validator configuration filename.xlsx --output location/configuration/initial

Start webservice for validation Excel files:

# start webservice and create new configuration file config.ini if it doesn't exist
excel-validator webservice

# start webservice and using a specific configuration file
excel-validator webservice --config configuration/webservice/config.ini

Python

The package can also imported directly in your Python application:

import excel_validator

#optionally enable logging
import logging
logging.basicConfig(format="%(asctime)s | %(levelname)s: %(message)s", datefmt="%m-%d-%y %H:%M:%S")
logging.getLogger("excel_validator.validator").setLevel(logging.INFO)

excelFilename = "/path/to/filename.xlsx"
configFilename = "/path/to/specific/configuration"
validation = excel_validator.Validate(excelFilename,configFilename)

A configuration for MIAPPE is already included in the software and can be used with:

configFilename = excel_validator.Validate.getConfigFilename("miappe")

The validation object contains the status (validation.valid) and can be used to create a report if the Excel file is found to be invalid:

validation.createMarkdownReport("report.md")
print(validation.createTextReport())

This software has been developed for the AGENT project

Metadata

Release files for excel-validator 0.9.5

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

Source distribution (sdist)

Source distribution for excel-validator 0.9.5
File Size Uploaded Provenance Actions
excel_validator-0.9.5.tar.gz 148.8 kB Without provenance Details for excel_validator-0.9.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for excel-validator 0.9.5
File Interpreter ABI Platform Actions
excel_validator-0.9.5-py3-none-any.whl Python 3 none any Details for excel_validator-0.9.5-py3-none-any.whl

Total release size: 333.4 kB

Release files / excel_validator-0.9.5.tar.gz

Download URL excel_validator-0.9.5.tar.gz
Size 148.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9b195581b9a642c9d485bc094467f5b6ca9883c88329943e8886130288545f52
BLAKE2b-256 checksum
How to use checksums
1b0446a200e7cecccce0a9654271571086c4eb1811e9f9eb6efa373f2faaaed7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.11

Release files / excel_validator-0.9.5-py3-none-any.whl

Download URL excel_validator-0.9.5-py3-none-any.whl
Size 184.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd93fd167e0e03b5bd1c7151eaf876d2968e2d56b86d6fdecd09425359099e92
BLAKE2b-256 checksum
How to use checksums
5135a22cf93bdf80eb3db5e65a1da624de50360e74f22f24d142b779af8cd1c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.11

Security for excel-validator 0.9.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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