29 lines
658 B
Go
29 lines
658 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"git.ecogood.org/andreas.schroepfer/excelConverter/pkg/loader"
|
|
excelize "github.com/360EntSecGroup-Skylar/excelize/v2"
|
|
)
|
|
|
|
func main() {
|
|
xFile, err := excelize.OpenFile("../../test/gwb-rechner_5_0_4_vollbilanz.xlsx")
|
|
fmt.Println("openFile err :", err)
|
|
sheets := xFile.GetSheetMap()
|
|
rows, _ := xFile.GetRows(sheets[4])
|
|
fmt.Printf("%#v", rows)
|
|
c := loader.Conf{}
|
|
c.Values = append(c.Values, loader.Value{})
|
|
c.Areas = append(c.Areas, loader.Area{
|
|
Cols: []loader.AreaCol{
|
|
loader.AreaCol{},
|
|
},
|
|
})
|
|
fd, err := os.OpenFile("conf.json", os.O_CREATE, 0777)
|
|
fmt.Println(err)
|
|
defer fd.Close()
|
|
c.EncodeJSON(fd)
|
|
}
|