Skip to content

Hide sheet does not work #418

@OFAH

Description

@OFAH

Hello all. Thank you for your work.
I have noticed that err := f.SetSheetVisible("Sheet1", false) does not work. Here is code:

package main

import (
"fmt"

"github.com/360EntSecGroup-Skylar/excelize"

)

func main() {
f := excelize.NewFile()
// Create a new sheet.
index := f.NewSheet("Sheet2")
// Set value of a cell.
f.SetCellValue("Sheet2", "A2", "Hello world.")
f.SetCellValue("Sheet1", "B2", 100)
// Set active sheet of the workbook.
f.SetActiveSheet(index)
// Save xlsx file by the given path.
err := f.SetSheetVisible("Sheet1", false)
err = f.SaveAs("./Book1.xlsx")
if err != nil {
fmt.Println(err)
}
}

Activity

added
confirmedThis issue can be reproduced
bugSomething isn't working
on Jun 7, 2019
xuri

xuri commented on Jun 7, 2019

@xuri
Member

Hi @OFAH, thanks for your issue. I have fixed it. Please try to upgrade the library with the master branch code.

added a commit that references this issue on Oct 23, 2020
229cdc4
added a commit that references this issue on Mar 14, 2024
421f945
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @xuri@OFAH

        Issue actions

          Hide sheet does not work · Issue #418 · qax-os/excelize