# excel-export Specification ## Purpose TBD - created by archiving change add-meeting-assistant-mvp. Update Purpose after archive. ## Requirements ### Requirement: Excel Report Generation The middleware server SHALL generate Excel reports from meeting data using templates. #### Scenario: Successful export - **WHEN** user requests GET /api/meetings/:id/export - **THEN** server SHALL generate Excel file and return as downloadable stream #### Scenario: Export non-existent meeting - **WHEN** user requests export for non-existent meeting ID - **THEN** server SHALL return HTTP 404 ### Requirement: Template-based Generation The Excel export SHALL use openpyxl with template files. #### Scenario: Placeholder replacement - **WHEN** Excel is generated - **THEN** placeholders ({{subject}}, {{time}}, {{chair}}, etc.) SHALL be replaced with actual meeting data #### Scenario: Dynamic row insertion - **WHEN** meeting has multiple conclusions or action items - **THEN** rows SHALL be dynamically inserted to accommodate all items ### Requirement: Complete Data Inclusion The exported Excel SHALL include all meeting metadata and AI-generated content. #### Scenario: Full metadata export - **WHEN** Excel is generated - **THEN** it SHALL include subject, meeting_time, location, chairperson, recorder, and attendees #### Scenario: Conclusions export - **WHEN** Excel is generated - **THEN** all conclusions SHALL be listed with their system codes #### Scenario: Action items export - **WHEN** Excel is generated - **THEN** all action items SHALL be listed with content, owner, due_date, status, and system code ### Requirement: Template Management Admin users SHALL be able to manage Excel templates. #### Scenario: Admin template access - **WHEN** admin user accesses template management - **THEN** they SHALL be able to upload, view, and update Excel templates