Automated Certificate Generator from XLSX Templates
Overview
The COI (Certificate of Inspection) Automation System streamlines the process of generating inspection certificates directly from Excel templates. Built for manufacturing and quality-control environments, it replaces manual report creation with a fast, data-driven workflow — ensuring consistent layouts, accurate data, and bilingual output (English-Japanese).
How It Works
Users upload a pre-designed XLSX certificate template containing placeholders such as {lot_no}, {qa1}, {qa2}, {spec}, etc.
When a lot number is entered and QA users are selected, the system automatically retrieves inspection data, replaces placeholders, and generates a ready-to-download file (Excel or PDF).
The interface includes:
- Lot Number Search
- Export Options (Checkboxes)
- QA.1 / QA.2 Dropdowns
- Acceptance Status Selection (Accepted / Special Accepted)
- Export Excel & Download Buttons
- Inspection Results Table

System Workflow
flowchart TD
A["Start"] --> B["Upload XLSX Template"]
B --> C["Define Placeholders<br/>{lot_no}, {qa1}, {qa2}, {spec}"]
C --> D["Select Data Source<br/>CSV / DB / API"]
D --> E["Map Fields<br/>data.lot_no → {lot_no}, data.qa1 → {qa1}"]
E --> F["User Inputs Lot No., QA.1, QA.2, Status"]
F --> G["System Validation"]
G -->|Valid| H["Generate Filled XLSX"]
G -->|Error| I["Show Error: Missing Data / Invalid Mapping"]
H --> J["Convert to PDF (Optional)"]
J --> K["Provide Download Link"]
K --> L["Notify User (Email / In-App)"]
L --> M["Archive Certificate + Audit Trail"]
M --> N["Finish"]
Key Features
- ✅ Reusable XLSX Templates – Upload once, reuse for any product or client.
- ⚙️ Batch Generation – Create hundreds of certificates in seconds.
- 🧠 Auto-fill & Validation – Ensures QA and lot fields are complete before export.
- 🧾 PDF + XLSX Outputs – Flexible formats for internal or customer use.
- 📋 Audit & Archive – Keeps generated files with logs for compliance tracking.
- 🌐 Multi-language Ready – Supports English, Japanese, and Thai labels.
Interface Overview
- Sidebar navigation: Dashboard, Reports, COI Export, Customer Templates, Settings.
-
Main view:
- Lot search field
- Export options
- QA selectors and status
- Export Excel button
- Generated inspection data table
Output Sample: Certificate of Inspection
| Field | Example Data |
|---|---|
| Customer | Simplico Inspection Co., Ltd. |
| Product Code | ABC-100X |
| Lot No. | L24091 |
| Tool No. | T-5523 |
| Inspection Date | 2025-10-14 |
| QA.1 | John Doe |
| QA.2 | Jane Smith |
| Status | Accepted |
| Inspection Item | Standard | Actual | Judgement |
|---|---|---|---|
| Dimension | ±0.01 mm | +0.009 mm | OK |
| Balance | ≤ 0.5 g | 0.32 g | OK |
| Appearance | No Defect | Pass | OK |
| Hardness | 60 ± 2 HRC | 61 | OK |
🧩 Technical Implementation
1. Framework & Stack
- Backend: Django (Python 3.11)
- Frontend: Tailwind CSS + Alpine.js + Flowbite UI
- Database: PostgreSQL (certificate metadata, QA user lists)
-
Libraries:
openpyxl– read/write XLSX templatesreportlab/xlsx2pdf– PDF conversionaxios– asynchronous certificate generation via APIdjango-browser-reload– live UI updates during template testing
2. Template Engine Logic
Each uploaded Excel template defines placeholders such as {lot_no}, {qa1}, {spec}.
At runtime:
- The system loads the Excel sheet via
openpyxl. - It scans each cell for placeholders using regex.
- It replaces placeholders with actual values from the database query.
- The filled workbook is saved to
/media/certificates/. - A signed URL is generated for download or audit logging.
Example (simplified Python snippet):
from openpyxl import load_workbook
def fill_certificate(template_path, data):
wb = load_workbook(template_path)
ws = wb.active
for row in ws.iter_rows():
for cell in row:
if cell.value and isinstance(cell.value, str):
for key, val in data.items():
cell.value = cell.value.replace(f"{{{key}}}", str(val))
wb.save("/media/certificates/COI_filled.xlsx")
3. API Workflow (Flask or Django View)
| Step | Endpoint | Method | Description |
|---|---|---|---|
| 1 | /api/start |
POST | Initialize COI generation |
| 2 | /api/upload |
POST | Upload XLSX template |
| 3 | /api/export |
POST | Merge data + generate certificate |
| 4 | /api/download |
GET | Provide download link |
| 5 | /api/status |
GET | Check processing or QA approval state |
4. Frontend Interaction
The front end uses Alpine.js reactive bindings:
<div x-data="COIReport()">
<input x-model="lot_no" placeholder="Enter Lot No.">
<select x-model="qa1">...</select>
<button @click="exportCOI()">Export Excel</button>
</div>
async exportCOI() {
const response = await axios.post('/api/export', {
lot_no: this.lot_no, qa1: this.qa1, qa2: this.qa2
});
this.downloadUrl = response.data.file_url;
}
5. Security & Traceability
- Role-based access control for QA and Admins
- Audit logs stored with timestamp, filename, and user ID
- Auto-expiration of download URLs
- Server-side template sanitization to prevent formula injection
6. Scalability
- Dockerized environment with Gunicorn + Nginx
- Task queue (Celery + Redis) for parallel certificate processing
- Static file caching for XLSX/PDF templates
Conclusion
This Simplico Certificate Generator automates the most tedious part of quality control — document preparation.
By combining Django’s reliability, Tailwind’s modern UI, and Excel’s familiarity, it creates a fast, secure, and highly scalable platform for generating professional inspection certificates.
Get in Touch with us
Related Posts
- Temporal × 本地大模型 × Robot Framework 面向中国企业的可靠业务自动化架构实践
- Building Reliable Office Automation with Temporal, Local LLMs, and Robot Framework
- RPA + AI: 为什么没有“智能”的自动化一定失败, 而没有“治理”的智能同样不可落地
- RPA + AI: Why Automation Fails Without Intelligence — and Intelligence Fails Without Control
- Simulating Border Conflict and Proxy War
- 先解决“检索与访问”问题 重塑高校图书馆战略价值的最快路径
- Fix Discovery & Access First: The Fastest Way to Restore the University Library’s Strategic Value
- 我们正在开发一个连接工厂与再生资源企业的废料交易平台
- We’re Building a Better Way for Factories and Recyclers to Trade Scrap
- 如何使用 Python 开发 MES(制造执行系统) —— 面向中国制造企业的实用指南
- How to Develop a Manufacturing Execution System (MES) with Python
- MES、ERP 与 SCADA 的区别与边界 —— 制造业系统角色与连接关系详解
- MES vs ERP vs SCADA: Roles and Boundaries Explained
- 为什么学习软件开发如此“痛苦” ——以及真正有效的解决方法
- Why Learning Software Development Feels So Painful — and How to Fix It
- 企业最终会选择哪种 AI:GPT 风格,还是 Gemini 风格?
- What Enterprises Will Choose: GPT-Style AI or Gemini-Style AI?
- GPT-5.2 在哪些真实业务场景中明显优于 GPT-5.1
- Top Real-World Use Cases Where GPT-5.2 Shines Over GPT-5.1
- ChatGPT 5.2 与 5.1 的区别 —— 用通俗类比来理解














