Skip to content

SetActiveSheet Doesn't Work? #735

@AngangGuo

Description

@AngangGuo

The following sample program will create a file named "test.xlsx". After I opened this file with Microsoft Excel Version 2008(Microsoft 365 Apps for enterprise), the "Details" sheet shows out instead of "Summary".

Is it an Excelize bug?

package main

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

func main()  {
	f := excelize.NewFile()
	summarySheet := "Summary"
	nSummary := f.NewSheet(summarySheet)
	detailSheet := "Details"
	f.NewSheet(detailSheet)

	// remove the default sheet
	defaultSheet:="Sheet1"
	f.DeleteSheet(defaultSheet)

	f.SetActiveSheet(nSummary)
	f.SaveAs("test.xlsx")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmedThis issue can be reproduced

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions