Skip to content

Fixed QueryAsync header handling in facade static class - #1008

Merged
michelebastione merged 1 commit into
mini-software:masterfrom
michelebastione:fix-hasheader-facade-parameter-usage
Sep 9, 2026
Merged

Fixed QueryAsync header handling in facade static class#1008
michelebastione merged 1 commit into
mini-software:masterfrom
michelebastione:fix-hasheader-facade-parameter-usage

Conversation

@michelebastione

@michelebastione michelebastione commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Inverted the hasHeader flag before forwarding it to the Excel and CSV importers from the MiniExcel facade class because their APIs use the opposite semantics.

Resolves #1007

Summary by CodeRabbit

  • Bug Fixes
    • Fixed asynchronous spreadsheet imports so the header-row setting is handled correctly for XLSX and CSV files.
    • Other import APIs remain unchanged.

Inverted the hasHeader flag before forwarding it to the Excel and CSV importers from the MiniExcel facade class because their APIs use the opposite semantics.
@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: 015b103b-4e26-40c4-bf59-488f06239f88

📥 Commits

Reviewing files that changed from the base of the PR and between 7d0db92 and de92785.

📒 Files selected for processing (1)
  • src/MiniExcel/MiniExcel.cs

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The generic QueryAsync<T> overloads for paths and streams now pass the inverted hasHeader value to XLSX and CSV importers. Stream overloads still preserve the input stream.

Changes

QueryAsync header forwarding

Layer / File(s) Summary
Invert header flag for importers
src/MiniExcel/MiniExcel.cs
The path-based and stream-based generic QueryAsync<T> overloads now pass !hasHeader to XLSX and CSV importers. The stream overload retains leaveOpen: true.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to de927

Generic asynchronous typed queries now correctly map header handling to the importer APIs for both file paths and streams, without changing stream ownership. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: fixing header handling in the static facade's QueryAsync methods.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@michelebastione
michelebastione merged commit fb70429 into mini-software:master Sep 9, 2026
4 checks passed
@michelebastione
michelebastione deleted the fix-hasheader-facade-parameter-usage branch September 9, 2026 21:28
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.

[BUG] - hasHeader is passed as treatHeaderAsData in MiniExcel.QueryAsync<T> → CsvImporter.QueryAsync<T>, inverting header semantics

1 participant