[bug fix] formula parse error
la-chemin opened this issue · comments
replace xls/sheets.go
250 xnum := binary.LittleEndian.Uint64(fdata[6:])
with
250 xnum := binary.LittleEndian.Uint64(fdata[0:])
would fix
Looking at the code history for that line I believe you, but can you provide an example file so I can verify this?
here is my test file testFile.xls
and the test code follows:
`
package main
import (
"fmt"
"github.com/pbnjay/grate"
_ "github.com/pbnjay/grate/xls"
)
func main() {
xlsFile, err := grate.Open("testFile.xls")
if err != nil {
fmt.Println("open xls failed", err)
return
}
sheets, _ := xlsFile.List()
for _, sheetName := range sheets {
fmt.Println(sheetName)
sheetObj, _ := xlsFile.Get(sheetName)
for sheetObj.Next() {
fmt.Println(sheetObj.Strings())
}
}
}`