csv -> xlsx

This commit is contained in:
2025-12-11 10:51:44 +00:00
parent aef0be80fc
commit d3127a29de
8 changed files with 74 additions and 43 deletions

23
xlsx/main.go Normal file
View 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
}