fix the bug of reading other sheets in one sheet

This commit is contained in:
Liu Ming
2015-06-16 10:29:58 +08:00
parent dff67234df
commit d0179503de
3 changed files with 27 additions and 41 deletions

View File

@@ -1,20 +0,0 @@
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)
}