In Go, I can now read an excel file and put it into a slice.
I know also how to read the value of a specific cell.
But I would like now to read a subset of the initial slice, so basically read only rows 10 to 15 and columns 23 to 25 for example.
My code below does not do that, it reads rows 35 and 36 and all columns. How can I read only columns 23 to 25 into df2?
package main
import (
"fmt"
"github.com/360EntSecGroup-Skylar/excelize"
)
func main() {
xlsx, err := excelize.OpenFile("/media/Snaps/test.xlsm")
if err != nil {
fmt.Println(err)
return
}
rows := xlsx.GetRows("ticker")
df2 := rows[10:15][23:25]
fmt.Println(df2)
}