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

IWorkBook.SetSheetName method will clear sheet.RepeatingRows #1182

Closed
1 task done
Broflosky opened this issue Sep 11, 2023 · 2 comments · Fixed by #1187
Closed
1 task done

IWorkBook.SetSheetName method will clear sheet.RepeatingRows #1182

Broflosky opened this issue Sep 11, 2023 · 2 comments · Fixed by #1187

Comments

@Broflosky
Copy link

NPOI Version

Version=2.3.0.0

File Type

  • XLSX

Upload the Excel File

https://1drv.ms/x/s!AsQkoVUMobm2ksILwjH66MLT7o-Ikg?e=AuqPa7

Reproduce Steps

  1. Clone a sheet by workBook
  2. Set sheet.RepeatingRows property
  3. Set sheet name by use workBook.SetSheetName() method
  4. Then found sheet.RepeatingRows property is null.

Issue Description

IWorkBook.SetSheetName method will clear sheet.RepeatingRows propery.
And by the way , I wonder why workBook.CloneSheet method does not clone sheet.RepeatingRows property?
image
image

@Broflosky Broflosky added the bug label Sep 11, 2023
@Bykiev
Copy link
Collaborator

Bykiev commented Sep 11, 2023

Hi, can't reproduce the issue with clearing RepeatingRows after calling workBook.SetSheetName() method in the latest version. You're using an old version NPOI, which was released more than 3 years ago.

I can reproduce, that RepeatingRows property is not copying on sheet clone, I'll try to research the issue

@tonyqus
Copy link
Member

tonyqus commented Sep 12, 2023

2.3.0 was released in Mar, 2017. It's too old

@tonyqus tonyqus added this to the NPOI 2.7.0 milestone Sep 12, 2023
Bykiev added a commit to Bykiev/npoi that referenced this issue Sep 15, 2023
This PR fixes nissl-lab#1182

Because RepeatingRows and RepeatingColumns are part of the Workbook, they're not serialized during creating a copy of the sheet. Just copy them manually
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants