21 lines
583 B
Go
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)
|
|
}
|