xls
xls copied to clipboard
Reading Numbers
Hello,
I have a column with a formula to get numbers and i cannot retrieve those numbers:
package main
import (
"fmt"
"github.com/extrame/xls"
)
func main() {
if xlFile, err := xls.Open("file.xls", "utf-8"); err == nil {
if sheet := xlFile.GetSheet(0); sheet != nil {
for i := 2; i <= (int(sheet.MaxRow)); i++ {
row := sheet.Row(i)
if row != nil {
col := row.Col(3)
fmt.Print("\n", col)
}
}
}
}
}
Everything else (text) i can retrieve
The column that i want to retrieve if has numbers i get "General", if the column has formulas i get nothing in the screen.
Problem with reading “general” instead of cell data is solved in my fork https://github.com/sergeilem/xls .