excelize icon indicating copy to clipboard operation
excelize copied to clipboard

feat: add IterateColumns method for improved performance

Open DengY11 opened this issue 5 months ago • 2 comments

PR Details

Add rows.IterateColumns(iterateFunc), iterate it with a callback function instead create a huge []string.And that will enhance memory performance

Related Issue

close #2191

Example:

err := rows.IterateColumns(func(index int, cell string) error {
    fmt.Printf("column %d: %s\n", index, cell)
    return nil
})

How Has This Been Tested

go test

Types of changes

  • [ ] Docs change / refactoring / dependency upgrade
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [x] My code follows the code style of this project.
  • [] My change requires a change to the documentation.
  • [x] I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTING document.
  • [x] I have added tests to cover my changes.
  • [x] All new and existing tests passed.

DengY11 avatar Aug 07 '25 03:08 DengY11

Codecov Report

:x: Patch coverage is 53.12500% with 30 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 99.14%. Comparing base (5d2ee53) to head (afebad2). :warning: Report is 21 commits behind head on master.

Files with missing lines Patch % Lines
rows.go 53.12% 22 Missing and 8 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2196      +/-   ##
==========================================
- Coverage   99.24%   99.14%   -0.10%     
==========================================
  Files          32       32              
  Lines       30562    30626      +64     
==========================================
+ Hits        30331    30365      +34     
- Misses        153      175      +22     
- Partials       78       86       +8     
Flag Coverage Δ
unittests 99.14% <53.12%> (-0.10%) :arrow_down:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Aug 07 '25 04:08 codecov[bot]

Is this pr still adding? Wish to add the feature

ankisme avatar Oct 08 '25 13:10 ankisme