|
|
@ -237,7 +237,7 @@ func (f *File) SetActiveSheet(index int) {
|
|
|
|
for idx, name := range f.GetSheetList() {
|
|
|
|
for idx, name := range f.GetSheetList() {
|
|
|
|
xlsx, err := f.workSheetReader(name)
|
|
|
|
xlsx, err := f.workSheetReader(name)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
// Chartsheet
|
|
|
|
// Chartsheet or dialogsheet
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if xlsx.SheetViews == nil {
|
|
|
|
if xlsx.SheetViews == nil {
|
|
|
@ -365,8 +365,8 @@ func (f *File) GetSheetIndex(name string) int {
|
|
|
|
return idx
|
|
|
|
return idx
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GetSheetMap provides a function to get worksheet and chartsheet name and
|
|
|
|
// GetSheetMap provides a function to get worksheet, chartsheet and
|
|
|
|
// ID map of XLSX. For example:
|
|
|
|
// dialogsheet ID and name map of XLSX. For example:
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// f, err := excelize.OpenFile("Book1.xlsx")
|
|
|
|
// f, err := excelize.OpenFile("Book1.xlsx")
|
|
|
|
// if err != nil {
|
|
|
|
// if err != nil {
|
|
|
@ -387,8 +387,8 @@ func (f *File) GetSheetMap() map[int]string {
|
|
|
|
return sheetMap
|
|
|
|
return sheetMap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GetSheetList provides a function to get worksheet and chartsheet name list
|
|
|
|
// GetSheetList provides a function to get worksheet, chartsheet and
|
|
|
|
// of workbook.
|
|
|
|
// dialogsheet name list of workbook.
|
|
|
|
func (f *File) GetSheetList() (list []string) {
|
|
|
|
func (f *File) GetSheetList() (list []string) {
|
|
|
|
wb := f.workbookReader()
|
|
|
|
wb := f.workbookReader()
|
|
|
|
if wb != nil {
|
|
|
|
if wb != nil {
|
|
|
|