Excel writes <sheetPr filterMode="1"/> when an AutoFilter is hiding rows; do the same. Co-Authored-By: Claude <noreply@anthropic.com>
- commit
- 909d761740b4ca7998b1321f25168282cca96bfe
- parent
- 11e97c537d90feef8ee40ed1e359a7e659d600da
- author
- Dami <dami.etoile@gmail.com>
| M | internal/ | 3 | +++ |
@@ -66,6 +66,9 @@ func (w *xlsxWriter) unknownSheet(c SnapCell) (string, bool) {
6666 func (w *xlsxWriter) sheet(bw *bufio.Writer, ws string, snap *Snapshot, active bool) int {6767 r := snap.Range6868 bw.WriteString(xmlHead + `<worksheet xmlns="` + sheetMain + `" xmlns:r="` + officeRel + `">`)69+ if len(snap.HiddenRows) > 0 {70+ bw.WriteString(`<sheetPr filterMode="1"/>`) // a filter is hiding rows71+ }6972 fmt.Fprintf(bw, `<dimension ref="%s%d:%s%d"/>`, excelColName(r.From.Col+1), r.From.Row+1, excelColName(r.To.Col+1), r.To.Row+1)7073 writeSheetView(bw, snap, active)7174 bw.WriteString(`<sheetFormatPr defaultRowHeight="15"/>`)