added method for opening .xls file from binary
This commit is contained in:
parent
1dd2ce626e
commit
2a63c31e82
5
xls.go
5
xls.go
@ -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) {
|
func parse(bts []byte, charset string) (wb *WorkBook, err error) {
|
||||||
var ole *ole2.Ole
|
var ole *ole2.Ole
|
||||||
if ole, err = ole2.Open(bts, charset); err == nil {
|
if ole, err = ole2.Open(bts, charset); err == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user