This Python script retrieves timestamps from an Excel file containing swipe records and exports them to a new Excel file. It allows you to filter the data by person's name, year, and month.
Script was initially generated with AI assistance.
- Python 3.x
- xlrd library for reading Excel files
- openpyxl library for writing Excel files
- Install Python 3.x from the official Python website.
- Create a Python virtual environment and activate it:
python -m venv .venv
source .venv/Scripts/activate
- Install the required packages:
pip install -r requirements.txt
- Run the script with the following command:
python cicoReportExporter.py [--year YEAR] [--month MONTH] [--output OUTPUT_FILE] [--name NAME]
- You will be prompted for the .xls file path as well as the sheet name which the database to be analyzed is stored.
--year, -y
: Specify the year for filtering the data (optional).--month, -m
: Specify the month for filtering the data (optional).--output, -o
: Specify the output file name (default is "cicoReport").--name, -n
: Specify the name of the person for filtering the data (optional).
Export data for all persons in April 2024 to a file named "cico_report":
python cicoReportExporter.py --year 2024 --month April
Export data for a specific person named "John" in May 2024 to a file named "john_report":
python cicoReportExporter.py --year 2024 --month May --name John --output john_report
This project is licensed under the MIT License. See the LICENSE file for details.