This commit is contained in:
Liu Ming
2017-02-21 16:59:50 +08:00
parent f02a04cbdd
commit 79987c0cd7
3 changed files with 9 additions and 33 deletions

View File

@@ -7,10 +7,10 @@ import (
)
func TestOpen(t *testing.T) {
if xlFile, err := Open("expenses.xls", "utf-8"); err == nil {
if xlFile, err := Open("t1.xls", "utf-8"); err == nil {
if sheet1 := xlFile.GetSheet(0); sheet1 != nil {
fmt.Println("Total Lines ", sheet1.MaxRow, sheet1.Name)
for i := 0; i <= int(sheet1.MaxRow); i++ {
for i := 265; i <= 267; i++ {
fmt.Printf("row %v point %v \n", i, sheet1.Row(i))
if sheet1.Row(i) == nil {
continue
@@ -18,6 +18,7 @@ func TestOpen(t *testing.T) {
row := sheet1.Row(i)
for index := row.FirstCol(); index < row.LastCol(); index++ {
fmt.Println(index, "==>", row.Col(index), " ")
fmt.Printf("%T\n", row.cols[uint16(index)])
}
// col1 := .Cols[0]
// col2 := sheet1.Row(uint16(i)].Cols[1]