From bd817ea8907386371f123426b66d7ee936f931c1 Mon Sep 17 00:00:00 2001 From: Josh Fyne Date: Thu, 16 Feb 2017 13:38:57 -0500 Subject: [PATCH] Put path back into a file --- excelize.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/excelize.go b/excelize.go index 46e0a84..58eb092 100644 --- a/excelize.go +++ b/excelize.go @@ -27,7 +27,12 @@ func OpenFile(filename string) (*File, error) { return nil, err } defer file.Close() - return OpenReader(file) + f, err := OpenReader(file) + if err != nil { + return nil, err + } + f.Path = filename + return f, nil } // OpenReader take an io.Reader and return a populated XLSX file.