21
0
xls/xls_test.go
2015-03-24 13:06:52 +08:00

21 lines
583 B
Go

package xls
import (
"bytes"
"fmt"
"testing"
)
func TestOpen(t *testing.T) {
wb, _ := Open("n201502111031.xls", "utf-8")
fmt.Println(wb.ReadAllCells(1000))
}
func TestBof(t *testing.T) {
bof := new(BOF)
bof.Id = 0x41E
bof.Size = 55
buf := bytes.NewReader([]byte{0x07, 0x00, 0x19, 0x00, 0x01, 0x22, 0x00, 0xE5, 0xFF, 0x22, 0x00, 0x23, 0x00, 0x2C, 0x00, 0x23, 0x00, 0x23, 0x00, 0x30, 0x00, 0x2E, 0x00, 0x30, 0x00, 0x30, 0x00, 0x3B, 0x00, 0x22, 0x00, 0xE5, 0xFF, 0x22, 0x00, 0x5C, 0x00, 0x2D, 0x00, 0x23, 0x00, 0x2C, 0x20, 0x00})
new(WorkBook).parseBof(buf, bof, bof, 0)
}