diff options
author | xuri <xuri.me@gmail.com> | 2019-12-31 01:01:16 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2019-12-31 01:01:16 +0800 |
commit | 5f5ec76740704a8362e5a120b4a3582b409a5fdd (patch) | |
tree | 91b258747b6126a2bd0226db13aa6c9af5be0d64 /pivotTable.go | |
parent | 09485b3f9f0aefc58d51462aed65c2416205c591 (diff) |
Fix #551, handle empty rows in streaming reading
Diffstat (limited to 'pivotTable.go')
-rw-r--r-- | pivotTable.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/pivotTable.go b/pivotTable.go index 8610280..70681ca 100644 --- a/pivotTable.go +++ b/pivotTable.go @@ -56,19 +56,17 @@ type PivotTableOption struct { // f.SetCellValue("Sheet1", fmt.Sprintf("D%d", i+2), rand.Intn(5000)) // f.SetCellValue("Sheet1", fmt.Sprintf("E%d", i+2), region[rand.Intn(4)]) // } -// err := f.AddPivotTable(&excelize.PivotTableOption{ +// if err := f.AddPivotTable(&excelize.PivotTableOption{ // DataRange: "Sheet1!$A$1:$E$31", // PivotTableRange: "Sheet1!$G$2:$M$34", // Rows: []string{"Month", "Year"}, // Columns: []string{"Type"}, // Data: []string{"Sales"}, -// }) -// if err != nil { -// fmt.Println(err) +// }); err != nil { +// println(err.Error()) // } -// err = f.SaveAs("Book1.xlsx") -// if err != nil { -// fmt.Println(err) +// if err := f.SaveAs("Book1.xlsx"); err != nil { +// println(err.Error()) // } // } // |