我正在尝试以下代码,但出现错误
“单值上下文中的多值 cell.String()”
代码
package main
import (
"fmt"
"github.com/tealeg/xlsx"
)
func main() {
excelFileName := "test.xlsx"
xlFile, err := xlsx.OpenFile(excelFileName)
if err != nil {
}
for _, sheet := range xlFile.Sheets {
for _, row := range sheet.Rows {
for _, cell := range row.Cells {
fmt.Printf("%s ", cell.String(), "123")
}
fmt.Printf("\n")
}
}
}
}