summaryrefslogtreecommitdiff
path: root/sheet_test.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2019-10-24 23:18:02 +0800
committerxuri <xuri.me@gmail.com>2019-10-24 23:18:02 +0800
commit87390cdd99b3afbe07daeef9abe96f57d03cb352 (patch)
tree54c2ec7b954f2f1f18bc4432902fce9e9c1dbc4d /sheet_test.go
parent9fe267ffcfa06545223160cdb8c35cd91163730e (diff)
Resolve #511, allow empty columns in the pivot table
Diffstat (limited to 'sheet_test.go')
-rw-r--r--sheet_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/sheet_test.go b/sheet_test.go
index 5179793..ea345a3 100644
--- a/sheet_test.go
+++ b/sheet_test.go
@@ -66,6 +66,15 @@ func ExampleFile_GetPageLayout() {
// - fit to width: 1
}
+func TestNewSheet(t *testing.T) {
+ f := excelize.NewFile()
+ sheetID := f.NewSheet("Sheet2")
+ f.SetActiveSheet(sheetID)
+ // delete original sheet
+ f.DeleteSheet(f.GetSheetName(f.GetSheetIndex("Sheet1")))
+ assert.NoError(t, f.SaveAs(filepath.Join("test", "TestNewSheet.xlsx")))
+}
+
func TestPageLayoutOption(t *testing.T) {
const sheet = "Sheet1"