package badtudexo import ( xl "git.gabbott.dev/george/excelize/v2" // st "saggytrousers" ) // Return the header of a given file, which must be the first row. func GetHeader(file *xl.File, sheet string) ([]string, error) { rows, err := file.Rows(sheet) if err != nil { return []string{}, err } rows.Next() header, err := rows.Columns() if err != nil { return []string{}, err } return header, nil }