From 2a63c31e823a11a20edde3594bc1d56fa54d5439 Mon Sep 17 00:00:00 2001 From: ivanzhangsolutions Date: Wed, 23 Dec 2015 11:47:09 -0500 Subject: [PATCH] added method for opening .xls file from binary --- xls.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xls.go b/xls.go index 2c93292..173dfde 100644 --- a/xls.go +++ b/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) { var ole *ole2.Ole if ole, err = ole2.Open(bts, charset); err == nil {