go读取excel的内容
import "github.com/360EntSecGroup-Skylar/excelize" func SimulationDataHandler(){ f, err := excelize.OpenFile("./dataset/teaching/样本10.xlsx") if err != nil { fmt.Println(err) return } // Get value from cell by given worksheet name and axis. cell:= f.GetCellValue("Sheet1", "B2") fmt.Println(cell) //fmt.Println(f) // Get all the rows in the Sheet1. rows := f.GetRows("Sheet1") //fmt.Println(len(rows)) for _, row := range rows { //fmt.Println(len(row)) fmt.Println("************") //读取每一行中所有的数据 for i := 0; i <len(row); i++ { fmt.Println(row[i]) } } }