20
0

added method for opening .xls file from binary

This commit is contained in:
ivanzhangsolutions 2015-12-23 11:47:09 -05:00
parent 1dd2ce626e
commit 2a63c31e82

5
xls.go
View File

@ -25,6 +25,11 @@ func OpenReader(reader io.ReadCloser, charset string) (*WorkBook, error) {
}
}
//Open xls file from binary
func OpenBinary(bin []byte, charset string) (*WorkBook, error) {
return parse(bin, charset)
}
func parse(bts []byte, charset string) (wb *WorkBook, err error) {
var ole *ole2.Ole
if ole, err = ole2.Open(bts, charset); err == nil {