Answer the question
In order to leave comments, you need to log in
What type of data should the function take?
excelFileName := "C:\\gowork\\src\\xl4\\test1.xlsx"
excelFileName2 := "C:\\gowork\\src\\xl4\\test2.xlsx"
//open
xlFile1, error1 := xlsx.OpenFile(excelFileName)
xlFile2, error2 := xlsx.OpenFile(excelFileName2)
//error
if error1 != nil && error2 != nil {
fmt.Println("file open errr")
}
sh1 := xlFile1.Sheets[0]
sh2 := xlFile2.Sheets[0]
Answer the question
In order to leave comments, you need to log in
Learn to read documentation. https://godoc.org/github.com/tealeg/xlsx#File
1. find the function that started it all,
2. see that it returns the type File, find this type,
type File struct {
Date1904 bool
Sheets []*Sheet
Sheet map[string]*Sheet
// contains filtered or unexported fields
}
type Sheet struct {
Name string
File *File
Rows []*Row
Cols []*Col
MaxRow int
MaxCol int
Hidden bool
Selected bool
SheetViews []SheetView
SheetFormat SheetFormat
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question