From 3ee3c38f9c63de3782fad21aae9c05ee0530fc32 Mon Sep 17 00:00:00 2001 From: xuri Date: Sun, 23 Jan 2022 00:32:34 +0800 Subject: Fix file corrupted in some cases, check file extension and format code Fix file corrupted when save as in XLAM / XLSM / XLTM / XLTX extension in some case New exported error ErrWorkbookExt has been added, and check file extension on save the workbook Format source code with `gofumpt` --- xmlPivotTable.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'xmlPivotTable.go') diff --git a/xmlPivotTable.go b/xmlPivotTable.go index 38dfb1e..a7543a7 100644 --- a/xmlPivotTable.go +++ b/xmlPivotTable.go @@ -195,8 +195,7 @@ type xlsxItem struct { } // xlsxAutoSortScope represents the sorting scope for the PivotTable. -type xlsxAutoSortScope struct { -} +type xlsxAutoSortScope struct{} // xlsxRowFields represents the collection of row fields for the PivotTable. type xlsxRowFields struct { @@ -225,8 +224,7 @@ type xlsxI struct { } // xlsxX represents an array of indexes to cached shared item values. -type xlsxX struct { -} +type xlsxX struct{} // xlsxColFields represents the collection of fields that are on the column // axis of the PivotTable. @@ -281,8 +279,7 @@ type xlsxDataField struct { // xlsxConditionalFormats represents the collection of conditional formats // applied to a PivotTable. -type xlsxConditionalFormats struct { -} +type xlsxConditionalFormats struct{} // xlsxPivotTableStyleInfo represent information on style applied to the // PivotTable. -- cgit v1.2.1