diff options
author | xuri <xuri.me@gmail.com> | 2020-11-06 20:03:13 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2020-11-06 20:03:13 +0800 |
commit | 5dd0b4aec2931079e064f1fb393b034ce4934540 (patch) | |
tree | 118b86bc2460f46b33de4aefcce0bb0b2a768afa /pivotTable.go | |
parent | cdc57db3b3758781bd053228bfb32879b3adf3de (diff) |
using POSIX directory separator in zip path with Windows
Diffstat (limited to 'pivotTable.go')
-rw-r--r-- | pivotTable.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pivotTable.go b/pivotTable.go index 3a277c3..96e3627 100644 --- a/pivotTable.go +++ b/pivotTable.go @@ -15,7 +15,6 @@ import ( "encoding/xml" "errors" "fmt" - "path/filepath" "strconv" "strings" ) @@ -139,9 +138,7 @@ func (f *File) AddPivotTable(opt *PivotTableOption) error { } // workbook pivot cache - wbPath := f.getWorkbookPath() - wbRelsPath := strings.TrimPrefix(filepath.Join(filepath.Dir(wbPath), "_rels", filepath.Base(wbPath)+".rels"), string(filepath.Separator)) - workBookPivotCacheRID := f.addRels(wbRelsPath, SourceRelationshipPivotCache, fmt.Sprintf("/xl/pivotCache/pivotCacheDefinition%d.xml", pivotCacheID), "") + workBookPivotCacheRID := f.addRels(f.getWorkbookRelsPath(), SourceRelationshipPivotCache, fmt.Sprintf("/xl/pivotCache/pivotCacheDefinition%d.xml", pivotCacheID), "") cacheID := f.addWorkbookPivotCache(workBookPivotCacheRID) pivotCacheRels := "xl/pivotTables/_rels/pivotTable" + strconv.Itoa(pivotTableID) + ".xml.rels" |