csv -> xlsx
This commit is contained in:
23
xlsx/main.go
Normal file
23
xlsx/main.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package xlsx
|
||||
|
||||
import (
|
||||
"github.com/xuri/excelize/v2"
|
||||
)
|
||||
|
||||
type Plan struct {
|
||||
Menus [7][3]string
|
||||
}
|
||||
|
||||
func Load() (Plan, error) {
|
||||
f, err := excelize.OpenFile("./plan.xlsx")
|
||||
if err != nil {
|
||||
return Plan{}, err
|
||||
}
|
||||
var menus [7][3]string
|
||||
for x := 0; x <= 2; x++ {
|
||||
for y := 0; y <= 6; y++ {
|
||||
menus[y][x], err = f.GetCellValue("Menüplan", string([]rune{rune('B' + x), rune('2' + y)}))
|
||||
}
|
||||
}
|
||||
return Plan{Menus: menus}, err
|
||||
}
|
||||
Reference in New Issue
Block a user