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)
}
}

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

    Issue actions