Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream writer improvements #1123

Merged
merged 19 commits into from
Oct 10, 2022
Merged

Stream writer improvements #1123

merged 19 commits into from
Oct 10, 2022

Conversation

harrison3000
Copy link
Contributor

@harrison3000 harrison3000 commented Jan 18, 2022

PR Details

This PR adds miscellaneous improvements to the stream writer API

Description

  • Adds SetPanes
  • Adds AutoFilter
  • Allows calling SetColWidth after rows have already been written
  • Adds a new type SharedString to use shared strings on stream mode on a opt-in manner

Related Issue

#1047

Motivation and Context

These changes make the stream API more flexible and less restricted

How Has This Been Tested

For now I only tested generating large sheets with real world data
I also looked at the xml and compared to another xml generated on normal mode
Automated tests on the way

Types of changes

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

Checklist

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

@xuri xuri added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 18, 2022
@harrison3000 harrison3000 changed the title Stream writer improvements - WIP Stream writer improvements Jan 22, 2022
@harrison3000
Copy link
Contributor Author

please review this PR, I have nothing more to add, it just need the finishing touches

@codecov-commenter
Copy link

codecov-commenter commented Jan 22, 2022

Codecov Report

Merging #1123 (72db604) into master (2f5704b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1123   +/-   ##
=======================================
  Coverage   98.44%   98.44%           
=======================================
  Files          31       31           
  Lines       23459    23469   +10     
=======================================
+ Hits        23095    23105   +10     
  Misses        242      242           
  Partials      122      122           
Flag Coverage Δ
unittests 98.44% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
errors.go 100.00% <ø> (ø)
sheet.go 100.00% <100.00%> (ø)
stream.go 90.23% <100.00%> (+0.11%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@xuri xuri left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks for your contribution. I've left some comments.

errors.go Outdated Show resolved Hide resolved
stream.go Outdated Show resolved Hide resolved
stream_test.go Show resolved Hide resolved
stream.go Outdated Show resolved Hide resolved
sheet.go Outdated Show resolved Hide resolved
Copy link
Member

@xuri xuri left a comment

Choose a reason for hiding this comment

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

I have made some changes based on your branch. This only added the set panes support for stream writer.

@xuri xuri merged commit c02346b into qax-os:master Oct 10, 2022
xuri pushed a commit to JDavidVR/excelize that referenced this pull request Jul 11, 2023
- New exported error `ErrStreamSetPanes` has been added
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this pull request Oct 22, 2023
- New exported error `ErrStreamSetPanes` has been added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants