summaryrefslogtreecommitdiff
path: root/excelize.go
diff options
context:
space:
mode:
authorJosh Fyne <josh.fyne@essencedigital.com>2017-02-16 13:38:57 -0500
committerJosh Fyne <josh.fyne@essencedigital.com>2017-02-16 13:38:57 -0500
commitbd817ea8907386371f123426b66d7ee936f931c1 (patch)
tree788642d27b7720678eaae7947fdb1b19ca582817 /excelize.go
parente8ba09d0c532edbfea22467379db9566308671c5 (diff)
Put path back into a file
Diffstat (limited to 'excelize.go')
-rw-r--r--excelize.go7
1 files changed, 6 insertions, 1 deletions
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.