GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix invalid range panics in IFS aggregate functions by EpicHigh · Pull Request #2456 · qax-os/excelize

Conversation

@EpicHigh

@EpicHigh EpicHigh commented Oct 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Prevent panics when a matched row or column falls outside a result range or a later criteria range. SUMIFS, AVERAGEIFS, MAXIFS, MINIFS, and COUNTIFS now return #VALUE! for these invalid accesses. The panic can stop an application that evaluates formulas from an untrusted workbook without recovering from panics.

Related to #2453. The other error-propagation issues in that report are outside this change.

Validation on Go 1.27.1, macOS arm64:

  • Added 49 range regression cases covering scalar inputs, too few rows or columns, arrays, and uneven array rows.
  • Reproduced the MAXIFS and MINIFS result-range panics and the SUMIFS later-criteria panic before the update. The new cases and existing formula tests pass after it.
  • gofmt -s, go vet ./..., and go build -v . passed.
  • go test -timeout 60m -race ./... with atomic coverage passed: 99.8% overall and 100% for the five functions and their shared matcher.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@EpicHigh
Fix AVERAGEIFS panic on an invalid average range
6bb5f04
Related to qax-os#2453.

Signed-off-by: Prasit Tongpradit <[email protected]>
xuri
xuri requested changes Oct 17, 2026
View reviewed changes
Comment thread calc.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

@EpicHigh
Fix range bounds across IFS aggregate functions
5dfab8f
Address review feedback in qax-os#2456. Related to qax-os#2453.

Signed-off-by: Prasit Tongpradit <[email protected]>
@EpicHigh EpicHigh changed the title Fix AVERAGEIFS panic on an invalid average range Fix invalid range panics in IFS aggregate functions Oct 17, 2026
@xuri
Add unit test for the changes and fix linter staticcheck ST1005 error…
725698b
… (strings should not end with punctuation or newlines)
@xuri xuri added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 17, 2026
@xuri
Fix test failed
b0c2659
@codecov

codecov Bot commented Oct 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.72%. Comparing base (402e3bd) to head (b227cda).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2456   +/-   ##
=======================================
  Coverage   99.72%   99.72%           
=======================================
  Files          32       32           
  Lines       32554    32588   +34     
=======================================
+ Hits        32464    32498   +34     
  Misses         88       88           
  Partials        2        2           
Flag Coverage Δ
unittests 99.72% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

xuri added 2 commits October 17, 2026 20:21
@xuri
Fix invalid test formula
5d4bff0
@xuri
Update unit tests
b227cda
@EpicHigh
EpicHigh requested a review from xuri October 17, 2026 13:52
xuri
xuri approved these changes Oct 17, 2026
View reviewed changes

@xuri xuri left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your pull request. I've made some changes based on your code branch.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

EpicHigh reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@xuri
xuri merged commit f10ef74 into qax-os:master Oct 17, 2026
15 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@xuri xuri added this to Excelize v2.11.1 Oct 17, 2026
@xuri xuri moved this to Bugfix in Excelize v2.11.1 Oct 17, 2026
@EpicHigh
EpicHigh deleted the 2453-averageifs-range-bounds branch October 18, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@xuri xuri xuri approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

No open projects
Excelize v2.11.1
Status: Bugfix

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@EpicHigh @xuri
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.