This repository contains a small Flask application that allows uploading a
Microsoft Access .mdb file. After uploading, the server exports the
Instruments table to an Excel workbook and reports how many valid instruments
were found using the Microsoft Access ODBC driver via pyodbc and
openpyxl.
- Python 3.11+
FlaskPython packagepyodbcpackage- Microsoft Access ODBC driver (installed with Microsoft Office/Access)
openpyxlpackagepycomm3package
You can install the Python dependencies with:
pip install flask pyodbc openpyxl pycomm3This application requires the Microsoft Access ODBC driver. On Windows this
driver is installed when Microsoft Access or the Access Database Engine is
present. Ensure the driver name Microsoft Access Driver (*.mdb, *.accdb) is
available on your system.
Start the server with:
python server.pyThen open your browser to http://localhost:5000.
You'll see a simple home page where you can choose to export instruments to
Excel, update an MDB from an exported Excel workbook, or read PLC
information. Selecting Export Instruments presents a form to upload an
.mdb file. After uploading, the server exports the Instruments table to an
Excel workbook and provides a link to download it, reporting how many
instruments were found. The Read PLC Info option opens a page to enter a
PLC IP address and slot number and displays basic details from the controller.
From the home page choose Update From Excel or visit /import directly.
Upload an existing MDB file together with an Excel workbook generated by this
program. The server verifies that each sheet has the same column layout,
ensures each row's ID and Tag already exist in the database, and only
updates fields that have changed. After the update you can download the
modified MDB file.