ClosedXML / ClosedXML/ClosedXML

Slicers from an existing file are lost when saved

Open
#2,166 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
5.7k
Forks
933
Avg merge
12h 14m
Merged PRs (30d)
1

Description

## Read and complete the full issue template

Do not randomly delete sections. They are here for a reason.

**Do you want to request a *feature* or report a *bug*?**
- [x] Bug
- [ ] Feature
- [ ] Question

**Did you test against the latest CI build?**
- [x] Yes
- [ ] No

If you answered `No`, please test with [the latest development build](https://ci.appveyor.com/project/ClosedXML/ClosedXML/branch/develop/artifacts) first.

**Version of ClosedXML**
`0.102.1`

**What is the current behavior?**
Open an excel file that has pivot tables and slicers attached to it, with ClosedXML.
Save it as a new file and open it using Excel. The slicers are no longer there.
I thought it could be related to #1703, but applying the fix from PR #1704 also doesn't work either.

**What is the expected behavior or new feature?**
Slicers should not be removed.

**Is this a regression from the previous version?**
No

## Reproducibility

**Code to reproduce problem:**
```c#
using ClosedXML.Excel;
public void Main()
{
var wb = new XLWorkbook("./Files/Source.xlsx");
wb.SaveAs("./Files/Destination.xlsx");
}
```

- [x] I attached a sample spreadsheet. (You can drag files on to this issue)
[Source.xlsx](https://github.com/ClosedXML/ClosedXML/files/12642112/Source.xlsx)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the attached Source.xlsx using XLWorkbook("./Files/Source.xlsx") and wb.SaveAs("./Files/Destination.xlsx"). Trace how pivot tables and their slicers are loaded and written during this round trip. Done means the saved workbook opens in Excel with its slicers still present.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.