diff options
Diffstat (limited to 'excelize.go')
-rw-r--r-- | excelize.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/excelize.go b/excelize.go index 3a511d1..2cbf54d 100644 --- a/excelize.go +++ b/excelize.go @@ -22,7 +22,6 @@ import ( "io/ioutil" "os" "path" - "path/filepath" "strconv" "strings" "sync" @@ -346,9 +345,7 @@ func (f *File) AddVBAProject(bin string) error { return errors.New("unsupported VBA project extension") } f.setContentTypePartVBAProjectExtensions() - wbPath := f.getWorkbookPath() - wbRelsPath := strings.TrimPrefix(filepath.Join(filepath.Dir(wbPath), "_rels", filepath.Base(wbPath)+".rels"), string(filepath.Separator)) - wb := f.relsReader(wbRelsPath) + wb := f.relsReader(f.getWorkbookRelsPath()) var rID int var ok bool for _, rel := range wb.Relationships { |