21
0
xls/xls_test.go

21 lines
583 B
Go
Raw Normal View History

2015-03-19 10:39:41 +01:00
package xls
import (
"bytes"
"fmt"
"testing"
)
func TestOpen(t *testing.T) {
2015-03-24 06:06:52 +01:00
wb, _ := Open("n201502111031.xls", "utf-8")
fmt.Println(wb.ReadAllCells(1000))
2015-03-19 10:39:41 +01:00
}
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)
}