Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 3, 2025

Excel loader was breaking at first blank row, ignoring all questions below it. Section headers (e.g., "Section 2: Cloud Computing") also stopped processing.

Changes

  • Skip blank rows: Continue iterating instead of breaking on empty cells
  • Detect section headers: Heuristic-based detection for common patterns:
    • Section prefixes (Section 1:, Part A:, Chapter 3:)
    • Decorated text (--- Category ---, === Section ===)
    • All uppercase short text
    • Numbered sections without question marks
  • Track row indices: Store original Excel row numbers in SheetData.row_indices so answers write back to correct positions
# Before: stops at row 4
# Row 2: Question 1  →  processed
# Row 3: Question 2  →  processed  
# Row 4: (blank)     →  BREAK
# Row 5: Question 3  →  never processed

# After: skips blanks and headers, tracks original positions
questions = ["Question 1", "Question 2", "Question 3"]
row_indices = [2, 3, 5]  # answers written to correct rows

Files

  • src/excel/loader.py: Modified loading logic, added _is_section_header()
  • src/utils/data_types.py: Added row_indices: Optional[List[int]] to SheetData
  • tests/unit/test_excel_blank_rows.py: 9 new tests for header detection and blank row handling
Original prompt

This section details on the original issue you should resolve

<issue_title>System should ignore blank rows in Excel sheets</issue_title>
<issue_description>If there's a blank row, or a question cell seems to contain something that isn't a question (like a section header) as judged up front by the large language model, then the system should just ignore that row and move on. Right now it stops right at the blank or header row and does not proceed with questions below it.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 3, 2025 23:32
Co-authored-by: mcasalaina <1323111+mcasalaina@users.noreply.github.com>
Co-authored-by: mcasalaina <1323111+mcasalaina@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix system to ignore blank rows in Excel sheets Skip blank rows and section headers in Excel processing Dec 3, 2025
Copilot AI requested a review from mcasalaina December 3, 2025 23:37
mcasalaina and others added 2 commits January 11, 2026 21:02
- Use Azure AI to intelligently detect which row contains column headers
- Use LLM to filter out section titles and labels, keeping only actual questions
- Fix web app to use detected header row instead of assuming row 1
- Add automated tests for Excel files with non-standard header positions
- Add test file with headers in row 3 and section titles to filter
- Preserve original row numbers for correct answer placement

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixed AgentExecutionError: Cannot access project_client from azure_client
that occurred when running the app in windowed mode with run_app.

Changes:
- Added project_client parameter to LinkCheckerExecutor
- Updated _resolve_connection_id to use provided project_client or fetch it
- Updated AgentCoordinator to pass project_client to link checker
- Fixed UI main_window.py to get and pass project_client for both single and parallel agent initialization

The AzureAIAgentClient doesn't expose project_client as a public attribute,
so we now pass it explicitly through the initialization chain.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System should ignore blank rows in Excel sheets

2 participants