• R/O
  • HTTP
  • SSH
  • HTTPS

excelize: 提交

Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets


Commit MetaInfo

修订版bef49e40eec508a6413e80ee5df7df52f7827424 (tree)
时间2022-08-28 01:16:41
作者davidborry <davidborryfr@gmai...>
CommiterGitHub

Log Message

This closes #1330 update non existing sheet error messages (#1331)

更改概述

差异

--- a/adjust_test.go
+++ b/adjust_test.go
@@ -339,7 +339,7 @@ func TestAdjustHelper(t *testing.T) {
339339 assert.EqualError(t, f.adjustHelper("Sheet1", rows, 0, 0), newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error())
340340 assert.EqualError(t, f.adjustHelper("Sheet2", rows, 0, 0), newCellNameToCoordinatesError("B", newInvalidCellNameError("B")).Error())
341341 // Test adjustHelper on not exists worksheet.
342- assert.EqualError(t, f.adjustHelper("SheetN", rows, 0, 0), "sheet SheetN is not exist")
342+ assert.EqualError(t, f.adjustHelper("SheetN", rows, 0, 0), "sheet SheetN does not exist")
343343 }
344344
345345 func TestAdjustCalcChain(t *testing.T) {
--- a/calc_test.go
+++ b/calc_test.go
@@ -4330,7 +4330,7 @@ func TestCalcCellValue(t *testing.T) {
43304330 // Test get calculated cell value on not exists worksheet.
43314331 f = prepareCalcData(cellData)
43324332 _, err = f.CalcCellValue("SheetN", "A1")
4333- assert.EqualError(t, err, "sheet SheetN is not exist")
4333+ assert.EqualError(t, err, "sheet SheetN does not exist")
43344334 // Test get calculated cell value with not support formula.
43354335 f = prepareCalcData(cellData)
43364336 assert.NoError(t, f.SetCellFormula("Sheet1", "A1", "=UNSUPPORT(A1)"))
--- a/cell_test.go
+++ b/cell_test.go
@@ -373,7 +373,7 @@ func TestGetCellFormula(t *testing.T) {
373373 // Test get cell formula on not exist worksheet.
374374 f := NewFile()
375375 _, err := f.GetCellFormula("SheetN", "A1")
376- assert.EqualError(t, err, "sheet SheetN is not exist")
376+ assert.EqualError(t, err, "sheet SheetN does not exist")
377377
378378 // Test get cell formula on no formula cell.
379379 assert.NoError(t, f.SetCellValue("Sheet1", "A1", true))
@@ -555,7 +555,7 @@ func TestGetCellRichText(t *testing.T) {
555555 assert.EqualError(t, err, "strconv.Atoi: parsing \"x\": invalid syntax")
556556 // Test set cell rich text on not exists worksheet
557557 _, err = f.GetCellRichText("SheetN", "A1")
558- assert.EqualError(t, err, "sheet SheetN is not exist")
558+ assert.EqualError(t, err, "sheet SheetN does not exist")
559559 // Test set cell rich text with illegal cell coordinates
560560 _, err = f.GetCellRichText("Sheet1", "A")
561561 assert.EqualError(t, err, newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error())
@@ -652,7 +652,7 @@ func TestSetCellRichText(t *testing.T) {
652652 assert.NoError(t, f.SetCellStyle("Sheet1", "A1", "A1", style))
653653 assert.NoError(t, f.SaveAs(filepath.Join("test", "TestSetCellRichText.xlsx")))
654654 // Test set cell rich text on not exists worksheet
655- assert.EqualError(t, f.SetCellRichText("SheetN", "A1", richTextRun), "sheet SheetN is not exist")
655+ assert.EqualError(t, f.SetCellRichText("SheetN", "A1", richTextRun), "sheet SheetN does not exist")
656656 // Test set cell rich text with illegal cell coordinates
657657 assert.EqualError(t, f.SetCellRichText("Sheet1", "A", richTextRun), newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error())
658658 richTextRun = []RichTextRun{{Text: strings.Repeat("s", TotalCellChars+1)}}
--- a/chart_test.go
+++ b/chart_test.go
@@ -114,7 +114,7 @@ func TestAddChart(t *testing.T) {
114114 assert.EqualError(t, f.AddChart("Sheet1", "P1", ""), "unexpected end of JSON input")
115115
116116 // Test add chart on not exists worksheet.
117- assert.EqualError(t, f.AddChart("SheetN", "P1", "{}"), "sheet SheetN is not exist")
117+ assert.EqualError(t, f.AddChart("SheetN", "P1", "{}"), "sheet SheetN does not exist")
118118
119119 assert.NoError(t, f.AddChart("Sheet1", "P1", `{"type":"col","series":[{"name":"Sheet1!$A$30","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$30:$D$30"},{"name":"Sheet1!$A$31","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$31:$D$31"},{"name":"Sheet1!$A$32","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$32:$D$32"},{"name":"Sheet1!$A$33","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$33:$D$33"},{"name":"Sheet1!$A$34","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$34:$D$34"},{"name":"Sheet1!$A$35","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$35:$D$35"},{"name":"Sheet1!$A$36","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$36:$D$36"},{"name":"Sheet1!$A$37","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$37:$D$37"}],"format":{"x_scale":1.0,"y_scale":1.0,"x_offset":15,"y_offset":10,"print_obj":true,"lock_aspect_ratio":false,"locked":false},"legend":{"none":true,"show_legend_key":true},"title":{"name":"2D Column Chart"},"plotarea":{"show_bubble_size":true,"show_cat_name":false,"show_leader_lines":false,"show_percent":true,"show_series_name":true,"show_val":true},"show_blanks_as":"zero"}`))
120120 assert.NoError(t, f.AddChart("Sheet1", "X1", `{"type":"colStacked","series":[{"name":"Sheet1!$A$30","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$30:$D$30"},{"name":"Sheet1!$A$31","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$31:$D$31"},{"name":"Sheet1!$A$32","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$32:$D$32"},{"name":"Sheet1!$A$33","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$33:$D$33"},{"name":"Sheet1!$A$34","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$34:$D$34"},{"name":"Sheet1!$A$35","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$35:$D$35"},{"name":"Sheet1!$A$36","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$36:$D$36"},{"name":"Sheet1!$A$37","categories":"Sheet1!$B$29:$D$29","values":"Sheet1!$B$37:$D$37"}],"format":{"x_scale":1.0,"y_scale":1.0,"x_offset":15,"y_offset":10,"print_obj":true,"lock_aspect_ratio":false,"locked":false},"legend":{"position":"left","show_legend_key":false},"title":{"name":"2D Stacked Column Chart"},"plotarea":{"show_bubble_size":true,"show_cat_name":false,"show_leader_lines":false,"show_percent":true,"show_series_name":true,"show_val":true},"show_blanks_as":"zero"}`))
@@ -250,7 +250,7 @@ func TestDeleteChart(t *testing.T) {
250250 assert.NoError(t, f.DeleteChart("Sheet1", "P1"))
251251 assert.NoError(t, f.SaveAs(filepath.Join("test", "TestDeleteChart.xlsx")))
252252 // Test delete chart on not exists worksheet.
253- assert.EqualError(t, f.DeleteChart("SheetN", "A1"), "sheet SheetN is not exist")
253+ assert.EqualError(t, f.DeleteChart("SheetN", "A1"), "sheet SheetN does not exist")
254254 // Test delete chart with invalid coordinates.
255255 assert.EqualError(t, f.DeleteChart("Sheet1", ""), newCellNameToCoordinatesError("", newInvalidCellNameError("")).Error())
256256 // Test delete chart on no chart worksheet.
--- a/col_test.go
+++ b/col_test.go
@@ -94,7 +94,7 @@ func TestColsError(t *testing.T) {
9494 t.FailNow()
9595 }
9696 _, err = f.Cols("SheetN")
97- assert.EqualError(t, err, "sheet SheetN is not exist")
97+ assert.EqualError(t, err, "sheet SheetN does not exist")
9898 assert.NoError(t, f.Close())
9999 }
100100
@@ -104,7 +104,7 @@ func TestGetColsError(t *testing.T) {
104104 t.FailNow()
105105 }
106106 _, err = f.GetCols("SheetN")
107- assert.EqualError(t, err, "sheet SheetN is not exist")
107+ assert.EqualError(t, err, "sheet SheetN does not exist")
108108 assert.NoError(t, f.Close())
109109
110110 f = NewFile()
@@ -205,7 +205,7 @@ func TestColumnVisibility(t *testing.T) {
205205
206206 // Test get column visible on an inexistent worksheet.
207207 _, err = f.GetColVisible("SheetN", "F")
208- assert.EqualError(t, err, "sheet SheetN is not exist")
208+ assert.EqualError(t, err, "sheet SheetN does not exist")
209209
210210 // Test get column visible with illegal cell coordinates.
211211 _, err = f.GetColVisible("Sheet1", "*")
@@ -215,7 +215,7 @@ func TestColumnVisibility(t *testing.T) {
215215 f.NewSheet("Sheet3")
216216 assert.NoError(t, f.SetColVisible("Sheet3", "E", false))
217217 assert.EqualError(t, f.SetColVisible("Sheet1", "A:-1", true), newInvalidColumnNameError("-1").Error())
218- assert.EqualError(t, f.SetColVisible("SheetN", "E", false), "sheet SheetN is not exist")
218+ assert.EqualError(t, f.SetColVisible("SheetN", "E", false), "sheet SheetN does not exist")
219219 assert.NoError(t, f.SaveAs(filepath.Join("test", "TestColumnVisibility.xlsx")))
220220 })
221221
@@ -243,7 +243,7 @@ func TestOutlineLevel(t *testing.T) {
243243
244244 level, err = f.GetColOutlineLevel("SheetN", "A")
245245 assert.Equal(t, uint8(0), level)
246- assert.EqualError(t, err, "sheet SheetN is not exist")
246+ assert.EqualError(t, err, "sheet SheetN does not exist")
247247
248248 assert.NoError(t, f.SetColWidth("Sheet2", "A", "D", 13))
249249 assert.EqualError(t, f.SetColWidth("Sheet2", "A", "D", MaxColumnWidth+1), ErrColumnWidth.Error())
@@ -253,10 +253,10 @@ func TestOutlineLevel(t *testing.T) {
253253 assert.EqualError(t, f.SetColOutlineLevel("Sheet1", "D", 8), ErrOutlineLevel.Error())
254254 assert.EqualError(t, f.SetRowOutlineLevel("Sheet1", 2, 8), ErrOutlineLevel.Error())
255255 // Test set row outline level on not exists worksheet.
256- assert.EqualError(t, f.SetRowOutlineLevel("SheetN", 1, 4), "sheet SheetN is not exist")
256+ assert.EqualError(t, f.SetRowOutlineLevel("SheetN", 1, 4), "sheet SheetN does not exist")
257257 // Test get row outline level on not exists worksheet.
258258 _, err = f.GetRowOutlineLevel("SheetN", 1)
259- assert.EqualError(t, err, "sheet SheetN is not exist")
259+ assert.EqualError(t, err, "sheet SheetN does not exist")
260260
261261 // Test set and get column outline level with illegal cell coordinates.
262262 assert.EqualError(t, f.SetColOutlineLevel("Sheet1", "*", 1), newInvalidColumnNameError("*").Error())
@@ -264,7 +264,7 @@ func TestOutlineLevel(t *testing.T) {
264264 assert.EqualError(t, err, newInvalidColumnNameError("*").Error())
265265
266266 // Test set column outline level on not exists worksheet.
267- assert.EqualError(t, f.SetColOutlineLevel("SheetN", "E", 2), "sheet SheetN is not exist")
267+ assert.EqualError(t, f.SetColOutlineLevel("SheetN", "E", 2), "sheet SheetN does not exist")
268268
269269 assert.EqualError(t, f.SetRowOutlineLevel("Sheet1", 0, 1), newInvalidRowNumberError(0).Error())
270270 level, err = f.GetRowOutlineLevel("Sheet1", 2)
@@ -292,7 +292,7 @@ func TestSetColStyle(t *testing.T) {
292292 styleID, err := f.NewStyle(`{"fill":{"type":"pattern","color":["#94d3a2"],"pattern":1}}`)
293293 assert.NoError(t, err)
294294 // Test set column style on not exists worksheet.
295- assert.EqualError(t, f.SetColStyle("SheetN", "E", styleID), "sheet SheetN is not exist")
295+ assert.EqualError(t, f.SetColStyle("SheetN", "E", styleID), "sheet SheetN does not exist")
296296 // Test set column style with illegal cell coordinates.
297297 assert.EqualError(t, f.SetColStyle("Sheet1", "*", styleID), newInvalidColumnNameError("*").Error())
298298 assert.EqualError(t, f.SetColStyle("Sheet1", "A:*", styleID), newInvalidColumnNameError("*").Error())
@@ -329,11 +329,11 @@ func TestColWidth(t *testing.T) {
329329 assert.EqualError(t, f.SetColWidth("Sheet1", "A", "*", 1), newInvalidColumnNameError("*").Error())
330330
331331 // Test set column width on not exists worksheet.
332- assert.EqualError(t, f.SetColWidth("SheetN", "B", "A", 12), "sheet SheetN is not exist")
332+ assert.EqualError(t, f.SetColWidth("SheetN", "B", "A", 12), "sheet SheetN does not exist")
333333
334334 // Test get column width on not exists worksheet.
335335 _, err = f.GetColWidth("SheetN", "A")
336- assert.EqualError(t, err, "sheet SheetN is not exist")
336+ assert.EqualError(t, err, "sheet SheetN does not exist")
337337
338338 assert.NoError(t, f.SaveAs(filepath.Join("test", "TestColWidth.xlsx")))
339339 convertRowHeightToPixels(0)
@@ -376,7 +376,7 @@ func TestRemoveCol(t *testing.T) {
376376 assert.EqualError(t, f.RemoveCol("Sheet1", "*"), newInvalidColumnNameError("*").Error())
377377
378378 // Test remove column on not exists worksheet.
379- assert.EqualError(t, f.RemoveCol("SheetN", "B"), "sheet SheetN is not exist")
379+ assert.EqualError(t, f.RemoveCol("SheetN", "B"), "sheet SheetN does not exist")
380380
381381 assert.NoError(t, f.SaveAs(filepath.Join("test", "TestRemoveCol.xlsx")))
382382 }
--- a/comment_test.go
+++ b/comment_test.go
@@ -31,7 +31,7 @@ func TestAddComments(t *testing.T) {
3131 assert.NoError(t, f.AddComment("Sheet2", "B7", `{"author":"Excelize: ","text":"This is a comment."}`))
3232
3333 // Test add comment on not exists worksheet.
34- assert.EqualError(t, f.AddComment("SheetN", "B7", `{"author":"Excelize: ","text":"This is a comment."}`), "sheet SheetN is not exist")
34+ assert.EqualError(t, f.AddComment("SheetN", "B7", `{"author":"Excelize: ","text":"This is a comment."}`), "sheet SheetN does not exist")
3535 // Test add comment on with illegal cell coordinates
3636 assert.EqualError(t, f.AddComment("Sheet1", "A", `{"author":"Excelize: ","text":"This is a comment."}`), newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error())
3737 if assert.NoError(t, f.SaveAs(filepath.Join("test", "TestAddComments.xlsx"))) {
@@ -66,7 +66,7 @@ func TestDeleteComment(t *testing.T) {
6666 assert.NoError(t, f.DeleteComment("Sheet2", "C41"))
6767 assert.EqualValues(t, 0, len(f.GetComments()["Sheet2"]))
6868 // Test delete comment on not exists worksheet
69- assert.EqualError(t, f.DeleteComment("SheetN", "A1"), "sheet SheetN is not exist")
69+ assert.EqualError(t, f.DeleteComment("SheetN", "A1"), "sheet SheetN does not exist")
7070 // Test delete comment with worksheet part
7171 f.Pkg.Delete("xl/worksheets/sheet1.xml")
7272 assert.NoError(t, f.DeleteComment("Sheet1", "A22"))
--- a/datavalidation_test.go
+++ b/datavalidation_test.go
@@ -90,7 +90,7 @@ func TestDataValidation(t *testing.T) {
9090
9191 // Test get data validation on no exists worksheet
9292 _, err = f.GetDataValidations("SheetN")
93- assert.EqualError(t, err, "sheet SheetN is not exist")
93+ assert.EqualError(t, err, "sheet SheetN does not exist")
9494
9595 assert.NoError(t, f.SaveAs(resultFile))
9696
@@ -158,7 +158,7 @@ func TestDataValidationError(t *testing.T) {
158158
159159 // Test add data validation on no exists worksheet.
160160 f = NewFile()
161- assert.EqualError(t, f.AddDataValidation("SheetN", nil), "sheet SheetN is not exist")
161+ assert.EqualError(t, f.AddDataValidation("SheetN", nil), "sheet SheetN does not exist")
162162 }
163163
164164 func TestDeleteDataValidation(t *testing.T) {
@@ -201,7 +201,7 @@ func TestDeleteDataValidation(t *testing.T) {
201201 assert.EqualError(t, f.DeleteDataValidation("Sheet1", "A1:B2"), newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error())
202202
203203 // Test delete data validation on no exists worksheet.
204- assert.EqualError(t, f.DeleteDataValidation("SheetN", "A1:B2"), "sheet SheetN is not exist")
204+ assert.EqualError(t, f.DeleteDataValidation("SheetN", "A1:B2"), "sheet SheetN does not exist")
205205
206206 // Test delete all data validations in the worksheet.
207207 assert.NoError(t, f.DeleteDataValidation("Sheet1"))
--- a/errors.go
+++ b/errors.go
@@ -70,10 +70,10 @@ func newCellNameToCoordinatesError(cell string, err error) error {
7070 return fmt.Errorf("cannot convert cell %q to coordinates: %v", cell, err)
7171 }
7272
73-// newNoExistSheetError defined the error message on receiving the not exist
73+// newNoExistSheetError defined the error message on receiving the non existing
7474 // sheet name.
7575 func newNoExistSheetError(name string) error {
76- return fmt.Errorf("sheet %s is not exist", name)
76+ return fmt.Errorf("sheet %s does not exist", name)
7777 }
7878
7979 // newNotWorksheetError defined the error message on receiving a sheet which
--- a/excelize_test.go
+++ b/excelize_test.go
@@ -29,7 +29,7 @@ func TestOpenFile(t *testing.T) {
2929
3030 // Test get all the rows in a not exists worksheet.
3131 _, err = f.GetRows("Sheet4")
32- assert.EqualError(t, err, "sheet Sheet4 is not exist")
32+ assert.EqualError(t, err, "sheet Sheet4 does not exist")
3333 // Test get all the rows in a worksheet.
3434 rows, err := f.GetRows("Sheet2")
3535 assert.NoError(t, err)
@@ -59,9 +59,9 @@ func TestOpenFile(t *testing.T) {
5959 f.NewSheet(":\\/?*[]Maximum 31 characters allowed in sheet title.")
6060 // Test set worksheet name with illegal name.
6161 f.SetSheetName("Maximum 31 characters allowed i", "[Rename]:\\/?* Maximum 31 characters allowed in sheet title.")
62- assert.EqualError(t, f.SetCellInt("Sheet3", "A23", 10), "sheet Sheet3 is not exist")
63- assert.EqualError(t, f.SetCellStr("Sheet3", "b230", "10"), "sheet Sheet3 is not exist")
64- assert.EqualError(t, f.SetCellStr("Sheet10", "b230", "10"), "sheet Sheet10 is not exist")
62+ assert.EqualError(t, f.SetCellInt("Sheet3", "A23", 10), "sheet Sheet3 does not exist")
63+ assert.EqualError(t, f.SetCellStr("Sheet3", "b230", "10"), "sheet Sheet3 does not exist")
64+ assert.EqualError(t, f.SetCellStr("Sheet10", "b230", "10"), "sheet Sheet10 does not exist")
6565
6666 // Test set cell string value with illegal row number.
6767 assert.EqualError(t, f.SetCellStr("Sheet1", "A", "10"), newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error())
@@ -122,11 +122,11 @@ func TestOpenFile(t *testing.T) {
122122 assert.NoError(t, f.SetCellValue("Sheet2", "F17", complex64(5+10i)))
123123
124124 // Test on not exists worksheet.
125- assert.EqualError(t, f.SetCellDefault("SheetN", "A1", ""), "sheet SheetN is not exist")
126- assert.EqualError(t, f.SetCellFloat("SheetN", "A1", 42.65418, 2, 32), "sheet SheetN is not exist")
127- assert.EqualError(t, f.SetCellBool("SheetN", "A1", true), "sheet SheetN is not exist")
128- assert.EqualError(t, f.SetCellFormula("SheetN", "A1", ""), "sheet SheetN is not exist")
129- assert.EqualError(t, f.SetCellHyperLink("SheetN", "A1", "Sheet1!A40", "Location"), "sheet SheetN is not exist")
125+ assert.EqualError(t, f.SetCellDefault("SheetN", "A1", ""), "sheet SheetN does not exist")
126+ assert.EqualError(t, f.SetCellFloat("SheetN", "A1", 42.65418, 2, 32), "sheet SheetN does not exist")
127+ assert.EqualError(t, f.SetCellBool("SheetN", "A1", true), "sheet SheetN does not exist")
128+ assert.EqualError(t, f.SetCellFormula("SheetN", "A1", ""), "sheet SheetN does not exist")
129+ assert.EqualError(t, f.SetCellHyperLink("SheetN", "A1", "Sheet1!A40", "Location"), "sheet SheetN does not exist")
130130
131131 // Test boolean write
132132 booltest := []struct {
@@ -151,7 +151,7 @@ func TestOpenFile(t *testing.T) {
151151 assert.NoError(t, f.SetCellValue("Sheet2", "G4", time.Now()))
152152
153153 assert.NoError(t, f.SetCellValue("Sheet2", "G4", time.Now().UTC()))
154- assert.EqualError(t, f.SetCellValue("SheetN", "A1", time.Now()), "sheet SheetN is not exist")
154+ assert.EqualError(t, f.SetCellValue("SheetN", "A1", time.Now()), "sheet SheetN does not exist")
155155 // 02:46:40
156156 assert.NoError(t, f.SetCellValue("Sheet2", "G5", time.Duration(1e13)))
157157 // Test completion column.
@@ -401,7 +401,7 @@ func TestGetCellHyperLink(t *testing.T) {
401401 assert.NoError(t, err)
402402 t.Log(link, target)
403403 link, target, err = f.GetCellHyperLink("Sheet3", "H3")
404- assert.EqualError(t, err, "sheet Sheet3 is not exist")
404+ assert.EqualError(t, err, "sheet Sheet3 does not exist")
405405 t.Log(link, target)
406406 assert.NoError(t, f.Close())
407407
@@ -968,7 +968,7 @@ func TestCopySheetError(t *testing.T) {
968968 t.FailNow()
969969 }
970970
971- assert.EqualError(t, f.copySheet(-1, -2), "sheet is not exist")
971+ assert.EqualError(t, f.copySheet(-1, -2), "sheet does not exist")
972972 if !assert.EqualError(t, f.CopySheet(-1, -2), "invalid worksheet index") {
973973 t.FailNow()
974974 }
@@ -984,7 +984,7 @@ func TestGetSheetComments(t *testing.T) {
984984 func TestSetSheetVisible(t *testing.T) {
985985 f := NewFile()
986986 f.WorkBook.Sheets.Sheet[0].Name = "SheetN"
987- assert.EqualError(t, f.SetSheetVisible("Sheet1", false), "sheet SheetN is not exist")
987+ assert.EqualError(t, f.SetSheetVisible("Sheet1", false), "sheet SheetN does not exist")
988988 }
989989
990990 func TestGetActiveSheetIndex(t *testing.T) {
@@ -1002,7 +1002,7 @@ func TestRelsWriter(t *testing.T) {
10021002 func TestGetSheetView(t *testing.T) {
10031003 f := NewFile()
10041004 _, err := f.getSheetView("SheetN", 0)
1005- assert.EqualError(t, err, "sheet SheetN is not exist")
1005+ assert.EqualError(t, err, "sheet SheetN does not exist")
10061006 }
10071007
10081008 func TestConditionalFormat(t *testing.T) {
@@ -1067,7 +1067,7 @@ func TestConditionalFormat(t *testing.T) {
10671067 // Test set invalid format set in conditional format.
10681068 assert.EqualError(t, f.SetConditionalFormat(sheet1, "L1:L10", ""), "unexpected end of JSON input")
10691069 // Set conditional format on not exists worksheet.
1070- assert.EqualError(t, f.SetConditionalFormat("SheetN", "L1:L10", "[]"), "sheet SheetN is not exist")
1070+ assert.EqualError(t, f.SetConditionalFormat("SheetN", "L1:L10", "[]"), "sheet SheetN does not exist")
10711071
10721072 err = f.SaveAs(filepath.Join("test", "TestConditionalFormat.xlsx"))
10731073 if !assert.NoError(t, err) {
@@ -1230,7 +1230,7 @@ func TestProtectSheet(t *testing.T) {
12301230 Password: "password",
12311231 }), ErrUnsupportedHashAlgorithm.Error())
12321232 // Test protect not exists worksheet.
1233- assert.EqualError(t, f.ProtectSheet("SheetN", nil), "sheet SheetN is not exist")
1233+ assert.EqualError(t, f.ProtectSheet("SheetN", nil), "sheet SheetN does not exist")
12341234 }
12351235
12361236 func TestUnprotectSheet(t *testing.T) {
@@ -1239,7 +1239,7 @@ func TestUnprotectSheet(t *testing.T) {
12391239 t.FailNow()
12401240 }
12411241 // Test remove protection on not exists worksheet.
1242- assert.EqualError(t, f.UnprotectSheet("SheetN"), "sheet SheetN is not exist")
1242+ assert.EqualError(t, f.UnprotectSheet("SheetN"), "sheet SheetN does not exist")
12431243
12441244 assert.NoError(t, f.UnprotectSheet("Sheet1"))
12451245 assert.EqualError(t, f.UnprotectSheet("Sheet1", "password"), ErrUnprotectSheet.Error())
@@ -1267,7 +1267,7 @@ func TestUnprotectSheet(t *testing.T) {
12671267 func TestSetDefaultTimeStyle(t *testing.T) {
12681268 f := NewFile()
12691269 // Test set default time style on not exists worksheet.
1270- assert.EqualError(t, f.setDefaultTimeStyle("SheetN", "", 0), "sheet SheetN is not exist")
1270+ assert.EqualError(t, f.setDefaultTimeStyle("SheetN", "", 0), "sheet SheetN does not exist")
12711271
12721272 // Test set default time style on invalid cell
12731273 assert.EqualError(t, f.setDefaultTimeStyle("Sheet1", "", 42), newCellNameToCoordinatesError("", newInvalidCellNameError("")).Error())
--- a/merge_test.go
+++ b/merge_test.go
@@ -65,7 +65,7 @@ func TestMergeCell(t *testing.T) {
6565 assert.NoError(t, f.MergeCell("Sheet3", "N10", "O11"))
6666
6767 // Test get merged cells on not exists worksheet.
68- assert.EqualError(t, f.MergeCell("SheetN", "N10", "O11"), "sheet SheetN is not exist")
68+ assert.EqualError(t, f.MergeCell("SheetN", "N10", "O11"), "sheet SheetN does not exist")
6969
7070 assert.NoError(t, f.SaveAs(filepath.Join("test", "TestMergeCell.xlsx")))
7171 assert.NoError(t, f.Close())
@@ -140,7 +140,7 @@ func TestGetMergeCells(t *testing.T) {
140140
141141 // Test get merged cells on not exists worksheet.
142142 _, err = f.GetMergeCells("SheetN")
143- assert.EqualError(t, err, "sheet SheetN is not exist")
143+ assert.EqualError(t, err, "sheet SheetN does not exist")
144144 assert.NoError(t, f.Close())
145145 }
146146
@@ -170,7 +170,7 @@ func TestUnmergeCell(t *testing.T) {
170170 f = NewFile()
171171 assert.NoError(t, f.MergeCell("Sheet1", "A2", "B3"))
172172 // Test unmerged area on not exists worksheet.
173- assert.EqualError(t, f.UnmergeCell("SheetN", "A1", "A1"), "sheet SheetN is not exist")
173+ assert.EqualError(t, f.UnmergeCell("SheetN", "A1", "A1"), "sheet SheetN does not exist")
174174
175175 ws, ok := f.Sheet.Load("xl/worksheets/sheet1.xml")
176176 assert.True(t, ok)
--- a/picture_test.go
+++ b/picture_test.go
@@ -128,7 +128,7 @@ func TestGetPicture(t *testing.T) {
128128
129129 // Try to get picture from a worksheet that doesn't contain any images.
130130 file, raw, err = f.GetPicture("Sheet3", "I9")
131- assert.EqualError(t, err, "sheet Sheet3 is not exist")
131+ assert.EqualError(t, err, "sheet Sheet3 does not exist")
132132 assert.Empty(t, file)
133133 assert.Empty(t, raw)
134134
@@ -196,7 +196,7 @@ func TestAddPictureFromBytes(t *testing.T) {
196196 return true
197197 })
198198 assert.Equal(t, 1, imageCount, "Duplicate image should only be stored once.")
199- assert.EqualError(t, f.AddPictureFromBytes("SheetN", fmt.Sprint("A", 1), "", "logo", ".png", imgFile), "sheet SheetN is not exist")
199+ assert.EqualError(t, f.AddPictureFromBytes("SheetN", fmt.Sprint("A", 1), "", "logo", ".png", imgFile), "sheet SheetN does not exist")
200200 }
201201
202202 func TestDeletePicture(t *testing.T) {
@@ -207,7 +207,7 @@ func TestDeletePicture(t *testing.T) {
207207 assert.NoError(t, f.DeletePicture("Sheet1", "P1"))
208208 assert.NoError(t, f.SaveAs(filepath.Join("test", "TestDeletePicture.xlsx")))
209209 // Test delete picture on not exists worksheet.
210- assert.EqualError(t, f.DeletePicture("SheetN", "A1"), "sheet SheetN is not exist")
210+ assert.EqualError(t, f.DeletePicture("SheetN", "A1"), "sheet SheetN does not exist")
211211 // Test delete picture with invalid coordinates.
212212 assert.EqualError(t, f.DeletePicture("Sheet1", ""), newCellNameToCoordinatesError("", newInvalidCellNameError("")).Error())
213213 assert.NoError(t, f.Close())
@@ -219,7 +219,7 @@ func TestDrawingResize(t *testing.T) {
219219 f := NewFile()
220220 // Test calculate drawing resize on not exists worksheet.
221221 _, _, _, _, err := f.drawingResize("SheetN", "A1", 1, 1, nil)
222- assert.EqualError(t, err, "sheet SheetN is not exist")
222+ assert.EqualError(t, err, "sheet SheetN does not exist")
223223 // Test calculate drawing resize with invalid coordinates.
224224 _, _, _, _, err = f.drawingResize("Sheet1", "", 1, 1, nil)
225225 assert.EqualError(t, err, newCellNameToCoordinatesError("", newInvalidCellNameError("")).Error())
--- a/pivotTable.go
+++ b/pivotTable.go
@@ -190,7 +190,7 @@ func (f *File) parseFormatPivotTableSet(opt *PivotTableOption) (*xlsxWorksheet,
190190 }
191191 pivotTableSheetPath, ok := f.getSheetXMLPath(pivotTableSheetName)
192192 if !ok {
193- return dataSheet, pivotTableSheetPath, fmt.Errorf("sheet %s is not exist", pivotTableSheetName)
193+ return dataSheet, pivotTableSheetPath, fmt.Errorf("sheet %s does not exist", pivotTableSheetName)
194194 }
195195 return dataSheet, pivotTableSheetPath, err
196196 }
--- a/pivotTable_test.go
+++ b/pivotTable_test.go
@@ -182,7 +182,7 @@ func TestAddPivotTable(t *testing.T) {
182182 Rows: []PivotTableField{{Data: "Month", DefaultSubtotal: true}, {Data: "Year"}},
183183 Columns: []PivotTableField{{Data: "Type", DefaultSubtotal: true}},
184184 Data: []PivotTableField{{Data: "Sales"}},
185- }), "sheet SheetN is not exist")
185+ }), "sheet SheetN does not exist")
186186 // Test the pivot table range of the worksheet that is not declared
187187 assert.EqualError(t, f.AddPivotTable(&PivotTableOption{
188188 DataRange: "Sheet1!$A$1:$E$31",
@@ -198,7 +198,7 @@ func TestAddPivotTable(t *testing.T) {
198198 Rows: []PivotTableField{{Data: "Month", DefaultSubtotal: true}, {Data: "Year"}},
199199 Columns: []PivotTableField{{Data: "Type", DefaultSubtotal: true}},
200200 Data: []PivotTableField{{Data: "Sales"}},
201- }), "sheet SheetN is not exist")
201+ }), "sheet SheetN does not exist")
202202 // Test not exists worksheet in data range
203203 assert.EqualError(t, f.AddPivotTable(&PivotTableOption{
204204 DataRange: "SheetN!$A$1:$E$31",
@@ -206,7 +206,7 @@ func TestAddPivotTable(t *testing.T) {
206206 Rows: []PivotTableField{{Data: "Month", DefaultSubtotal: true}, {Data: "Year"}},
207207 Columns: []PivotTableField{{Data: "Type", DefaultSubtotal: true}},
208208 Data: []PivotTableField{{Data: "Sales"}},
209- }), "sheet SheetN is not exist")
209+ }), "sheet SheetN does not exist")
210210 // Test invalid row number in data range
211211 assert.EqualError(t, f.AddPivotTable(&PivotTableOption{
212212 DataRange: "Sheet1!$A$0:$E$31",
@@ -298,7 +298,7 @@ func TestGetPivotFieldsOrder(t *testing.T) {
298298 f := NewFile()
299299 // Test get pivot fields order with not exist worksheet
300300 _, err := f.getPivotFieldsOrder(&PivotTableOption{DataRange: "SheetN!$A$1:$E$31"})
301- assert.EqualError(t, err, "sheet SheetN is not exist")
301+ assert.EqualError(t, err, "sheet SheetN does not exist")
302302 }
303303
304304 func TestGetPivotTableFieldName(t *testing.T) {
--- a/rows.go
+++ b/rows.go
@@ -202,13 +202,13 @@ func appendSpace(l int, s []string) []string {
202202 return s
203203 }
204204
205-// ErrSheetNotExist defines an error of sheet is not exist
205+// ErrSheetNotExist defines an error of sheet that does not exist
206206 type ErrSheetNotExist struct {
207207 SheetName string
208208 }
209209
210210 func (err ErrSheetNotExist) Error() string {
211- return fmt.Sprintf("sheet %s is not exist", err.SheetName)
211+ return fmt.Sprintf("sheet %s does not exist", err.SheetName)
212212 }
213213
214214 // rowXMLIterator defined runtime use field for the worksheet row SAX parser.
--- a/rows_test.go
+++ b/rows_test.go
@@ -128,7 +128,7 @@ func TestRowsError(t *testing.T) {
128128 t.FailNow()
129129 }
130130 _, err = f.Rows("SheetN")
131- assert.EqualError(t, err, "sheet SheetN is not exist")
131+ assert.EqualError(t, err, "sheet SheetN does not exist")
132132 assert.NoError(t, f.Close())
133133 }
134134
@@ -160,9 +160,9 @@ func TestRowHeight(t *testing.T) {
160160 assert.Equal(t, defaultRowHeight, height)
161161
162162 // Test set and get row height on not exists worksheet.
163- assert.EqualError(t, f.SetRowHeight("SheetN", 1, 111.0), "sheet SheetN is not exist")
163+ assert.EqualError(t, f.SetRowHeight("SheetN", 1, 111.0), "sheet SheetN does not exist")
164164 _, err = f.GetRowHeight("SheetN", 3)
165- assert.EqualError(t, err, "sheet SheetN is not exist")
165+ assert.EqualError(t, err, "sheet SheetN does not exist")
166166
167167 // Test get row height with custom default row height.
168168 assert.NoError(t, f.SetSheetFormatPr(sheet1,
@@ -246,13 +246,13 @@ func TestRowVisibility(t *testing.T) {
246246 assert.Equal(t, false, visible)
247247 assert.NoError(t, err)
248248 assert.EqualError(t, f.SetRowVisible("Sheet3", 0, true), newInvalidRowNumberError(0).Error())
249- assert.EqualError(t, f.SetRowVisible("SheetN", 2, false), "sheet SheetN is not exist")
249+ assert.EqualError(t, f.SetRowVisible("SheetN", 2, false), "sheet SheetN does not exist")
250250
251251 visible, err = f.GetRowVisible("Sheet3", 0)
252252 assert.Equal(t, false, visible)
253253 assert.EqualError(t, err, newInvalidRowNumberError(0).Error())
254254 _, err = f.GetRowVisible("SheetN", 1)
255- assert.EqualError(t, err, "sheet SheetN is not exist")
255+ assert.EqualError(t, err, "sheet SheetN does not exist")
256256
257257 assert.NoError(t, f.SaveAs(filepath.Join("test", "TestRowVisibility.xlsx")))
258258 }
@@ -315,7 +315,7 @@ func TestRemoveRow(t *testing.T) {
315315 assert.NoError(t, f.SaveAs(filepath.Join("test", "TestRemoveRow.xlsx")))
316316
317317 // Test remove row on not exist worksheet
318- assert.EqualError(t, f.RemoveRow("SheetN", 1), `sheet SheetN is not exist`)
318+ assert.EqualError(t, f.RemoveRow("SheetN", 1), `sheet SheetN does not exist`)
319319 }
320320
321321 func TestInsertRow(t *testing.T) {
@@ -878,7 +878,7 @@ func TestDuplicateRowTo(t *testing.T) {
878878 })
879879 assert.EqualError(t, f.DuplicateRowTo(sheetName, 1, 2), newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error())
880880 // Test duplicate row on not exists worksheet
881- assert.EqualError(t, f.DuplicateRowTo("SheetN", 1, 2), "sheet SheetN is not exist")
881+ assert.EqualError(t, f.DuplicateRowTo("SheetN", 1, 2), "sheet SheetN does not exist")
882882 }
883883
884884 func TestDuplicateMergeCells(t *testing.T) {
@@ -888,7 +888,7 @@ func TestDuplicateMergeCells(t *testing.T) {
888888 }}
889889 assert.EqualError(t, f.duplicateMergeCells("Sheet1", ws, 0, 0), `cannot convert cell "-" to coordinates: invalid cell name "-"`)
890890 ws.MergeCells.Cells[0].Ref = "A1:B1"
891- assert.EqualError(t, f.duplicateMergeCells("SheetN", ws, 1, 2), "sheet SheetN is not exist")
891+ assert.EqualError(t, f.duplicateMergeCells("SheetN", ws, 1, 2), "sheet SheetN does not exist")
892892 }
893893
894894 func TestGetValueFromInlineStr(t *testing.T) {
@@ -923,7 +923,7 @@ func TestGetValueFromNumber(t *testing.T) {
923923
924924 func TestErrSheetNotExistError(t *testing.T) {
925925 err := ErrSheetNotExist{SheetName: "Sheet1"}
926- assert.EqualValues(t, err.Error(), "sheet Sheet1 is not exist")
926+ assert.EqualValues(t, err.Error(), "sheet Sheet1 does not exist")
927927 }
928928
929929 func TestCheckRow(t *testing.T) {
@@ -949,7 +949,7 @@ func TestSetRowStyle(t *testing.T) {
949949 assert.EqualError(t, f.SetRowStyle("Sheet1", 5, -1, style2), newInvalidRowNumberError(-1).Error())
950950 assert.EqualError(t, f.SetRowStyle("Sheet1", 1, TotalRows+1, style2), ErrMaxRows.Error())
951951 assert.EqualError(t, f.SetRowStyle("Sheet1", 1, 1, -1), newInvalidStyleID(-1).Error())
952- assert.EqualError(t, f.SetRowStyle("SheetN", 1, 1, style2), "sheet SheetN is not exist")
952+ assert.EqualError(t, f.SetRowStyle("SheetN", 1, 1, style2), "sheet SheetN does not exist")
953953 assert.NoError(t, f.SetRowStyle("Sheet1", 5, 1, style2))
954954 cellStyleID, err := f.GetCellStyle("Sheet1", "B2")
955955 assert.NoError(t, err)
--- a/shape_test.go
+++ b/shape_test.go
@@ -36,7 +36,7 @@ func TestAddShape(t *testing.T) {
3636 }
3737 }],
3838 "height": 90
39- }`), "sheet Sheet3 is not exist")
39+ }`), "sheet Sheet3 does not exist")
4040 assert.EqualError(t, f.AddShape("Sheet3", "H1", ""), "unexpected end of JSON input")
4141 assert.EqualError(t, f.AddShape("Sheet1", "A", `{
4242 "type": "rect",
--- a/sheet_test.go
+++ b/sheet_test.go
@@ -102,7 +102,7 @@ func TestSetPane(t *testing.T) {
102102 f.NewSheet("Panes 4")
103103 assert.NoError(t, f.SetPanes("Panes 4", `{"freeze":true,"split":false,"x_split":0,"y_split":9,"top_left_cell":"A34","active_pane":"bottomLeft","panes":[{"sqref":"A11:XFD11","active_cell":"A11","pane":"bottomLeft"}]}`))
104104 assert.NoError(t, f.SetPanes("Panes 4", ""))
105- assert.EqualError(t, f.SetPanes("SheetN", ""), "sheet SheetN is not exist")
105+ assert.EqualError(t, f.SetPanes("SheetN", ""), "sheet SheetN does not exist")
106106 assert.NoError(t, f.SaveAs(filepath.Join("test", "TestSetPane.xlsx")))
107107 // Test add pane on empty sheet views worksheet
108108 f = NewFile()
@@ -181,7 +181,7 @@ func TestSearchSheet(t *testing.T) {
181181 }
182182 // Test search in a not exists worksheet.
183183 _, err = f.SearchSheet("Sheet4", "")
184- assert.EqualError(t, err, "sheet Sheet4 is not exist")
184+ assert.EqualError(t, err, "sheet Sheet4 does not exist")
185185 var expected []string
186186 // Test search a not exists value.
187187 result, err := f.SearchSheet("Sheet1", "X")
@@ -225,20 +225,20 @@ func TestSearchSheet(t *testing.T) {
225225 func TestSetPageLayout(t *testing.T) {
226226 f := NewFile()
227227 // Test set page layout on not exists worksheet.
228- assert.EqualError(t, f.SetPageLayout("SheetN"), "sheet SheetN is not exist")
228+ assert.EqualError(t, f.SetPageLayout("SheetN"), "sheet SheetN does not exist")
229229 }
230230
231231 func TestGetPageLayout(t *testing.T) {
232232 f := NewFile()
233233 // Test get page layout on not exists worksheet.
234- assert.EqualError(t, f.GetPageLayout("SheetN"), "sheet SheetN is not exist")
234+ assert.EqualError(t, f.GetPageLayout("SheetN"), "sheet SheetN does not exist")
235235 }
236236
237237 func TestSetHeaderFooter(t *testing.T) {
238238 f := NewFile()
239239 assert.NoError(t, f.SetCellStr("Sheet1", "A1", "Test SetHeaderFooter"))
240240 // Test set header and footer on not exists worksheet.
241- assert.EqualError(t, f.SetHeaderFooter("SheetN", nil), "sheet SheetN is not exist")
241+ assert.EqualError(t, f.SetHeaderFooter("SheetN", nil), "sheet SheetN does not exist")
242242 // Test set header and footer with illegal setting.
243243 assert.EqualError(t, f.SetHeaderFooter("Sheet1", &FormatHeaderFooter{
244244 OddHeader: strings.Repeat("c", MaxFieldLength+1),
@@ -301,7 +301,7 @@ func TestGroupSheets(t *testing.T) {
301301 for _, sheet := range sheets {
302302 f.NewSheet(sheet)
303303 }
304- assert.EqualError(t, f.GroupSheets([]string{"Sheet1", "SheetN"}), "sheet SheetN is not exist")
304+ assert.EqualError(t, f.GroupSheets([]string{"Sheet1", "SheetN"}), "sheet SheetN does not exist")
305305 assert.EqualError(t, f.GroupSheets([]string{"Sheet2", "Sheet3"}), "group worksheet must contain an active worksheet")
306306 assert.NoError(t, f.GroupSheets([]string{"Sheet1", "Sheet2"}))
307307 assert.NoError(t, f.SaveAs(filepath.Join("test", "TestGroupSheets.xlsx")))
@@ -323,7 +323,7 @@ func TestInsertPageBreak(t *testing.T) {
323323 assert.NoError(t, f.InsertPageBreak("Sheet1", "C3"))
324324 assert.NoError(t, f.InsertPageBreak("Sheet1", "C3"))
325325 assert.EqualError(t, f.InsertPageBreak("Sheet1", "A"), newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error())
326- assert.EqualError(t, f.InsertPageBreak("SheetN", "C3"), "sheet SheetN is not exist")
326+ assert.EqualError(t, f.InsertPageBreak("SheetN", "C3"), "sheet SheetN does not exist")
327327 assert.NoError(t, f.SaveAs(filepath.Join("test", "TestInsertPageBreak.xlsx")))
328328 }
329329
@@ -349,7 +349,7 @@ func TestRemovePageBreak(t *testing.T) {
349349 assert.NoError(t, f.RemovePageBreak("Sheet2", "B2"))
350350
351351 assert.EqualError(t, f.RemovePageBreak("Sheet1", "A"), newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error())
352- assert.EqualError(t, f.RemovePageBreak("SheetN", "C3"), "sheet SheetN is not exist")
352+ assert.EqualError(t, f.RemovePageBreak("SheetN", "C3"), "sheet SheetN does not exist")
353353 assert.NoError(t, f.SaveAs(filepath.Join("test", "TestRemovePageBreak.xlsx")))
354354 }
355355
--- a/sheetpr_test.go
+++ b/sheetpr_test.go
@@ -180,13 +180,13 @@ func TestSetSheetPrOptions(t *testing.T) {
180180 f := NewFile()
181181 assert.NoError(t, f.SetSheetPrOptions("Sheet1", TabColorRGB("")))
182182 // Test SetSheetPrOptions on not exists worksheet.
183- assert.EqualError(t, f.SetSheetPrOptions("SheetN"), "sheet SheetN is not exist")
183+ assert.EqualError(t, f.SetSheetPrOptions("SheetN"), "sheet SheetN does not exist")
184184 }
185185
186186 func TestGetSheetPrOptions(t *testing.T) {
187187 f := NewFile()
188188 // Test GetSheetPrOptions on not exists worksheet.
189- assert.EqualError(t, f.GetSheetPrOptions("SheetN"), "sheet SheetN is not exist")
189+ assert.EqualError(t, f.GetSheetPrOptions("SheetN"), "sheet SheetN does not exist")
190190 }
191191
192192 var _ = []PageMarginsOptions{
@@ -328,13 +328,13 @@ func TestPageMarginsOption(t *testing.T) {
328328 func TestSetPageMargins(t *testing.T) {
329329 f := NewFile()
330330 // Test set page margins on not exists worksheet.
331- assert.EqualError(t, f.SetPageMargins("SheetN"), "sheet SheetN is not exist")
331+ assert.EqualError(t, f.SetPageMargins("SheetN"), "sheet SheetN does not exist")
332332 }
333333
334334 func TestGetPageMargins(t *testing.T) {
335335 f := NewFile()
336336 // Test get page margins on not exists worksheet.
337- assert.EqualError(t, f.GetPageMargins("SheetN"), "sheet SheetN is not exist")
337+ assert.EqualError(t, f.GetPageMargins("SheetN"), "sheet SheetN does not exist")
338338 }
339339
340340 func ExampleFile_SetSheetFormatPr() {
@@ -469,7 +469,7 @@ func TestSetSheetFormatPr(t *testing.T) {
469469 ws.(*xlsxWorksheet).SheetFormatPr = nil
470470 assert.NoError(t, f.SetSheetFormatPr("Sheet1", BaseColWidth(1.0)))
471471 // Test set formatting properties on not exists worksheet.
472- assert.EqualError(t, f.SetSheetFormatPr("SheetN"), "sheet SheetN is not exist")
472+ assert.EqualError(t, f.SetSheetFormatPr("SheetN"), "sheet SheetN does not exist")
473473 }
474474
475475 func TestGetSheetFormatPr(t *testing.T) {
@@ -497,5 +497,5 @@ func TestGetSheetFormatPr(t *testing.T) {
497497 &thickBottom,
498498 ))
499499 // Test get formatting properties on not exists worksheet.
500- assert.EqualError(t, f.GetSheetFormatPr("SheetN"), "sheet SheetN is not exist")
500+ assert.EqualError(t, f.GetSheetFormatPr("SheetN"), "sheet SheetN does not exist")
501501 }
--- a/sparkline_test.go
+++ b/sparkline_test.go
@@ -218,7 +218,7 @@ func TestAddSparkline(t *testing.T) {
218218 assert.EqualError(t, f.AddSparkline("SheetN", &SparklineOption{
219219 Location: []string{"F3"},
220220 Range: []string{"Sheet2!A3:E3"},
221- }), "sheet SheetN is not exist")
221+ }), "sheet SheetN does not exist")
222222
223223 assert.EqualError(t, f.AddSparkline("Sheet1", nil), ErrParameterRequired.Error())
224224
--- a/stream_test.go
+++ b/stream_test.go
@@ -198,7 +198,7 @@ func TestNewStreamWriter(t *testing.T) {
198198 _, err := file.NewStreamWriter("Sheet1")
199199 assert.NoError(t, err)
200200 _, err = file.NewStreamWriter("SheetN")
201- assert.EqualError(t, err, "sheet SheetN is not exist")
201+ assert.EqualError(t, err, "sheet SheetN does not exist")
202202 }
203203
204204 func TestSetRow(t *testing.T) {
--- a/styles.go
+++ b/styles.go
@@ -1966,7 +1966,7 @@ var getXfIDFuncs = map[string]func(int, xlsxXf, *Style) bool{
19661966 }
19671967
19681968 // getStyleID provides a function to get styleID by given style. If given
1969-// style is not exist, will return -1.
1969+// style does not exist, will return -1.
19701970 func (f *File) getStyleID(ss *xlsxStyleSheet, style *Style) (styleID int) {
19711971 styleID = -1
19721972 if ss.CellXfs == nil {
@@ -2047,7 +2047,7 @@ func (f *File) readDefaultFont() *xlsxFont {
20472047 }
20482048
20492049 // getFontID provides a function to get font ID.
2050-// If given font is not exist, will return -1.
2050+// If given font does not exist, will return -1.
20512051 func (f *File) getFontID(styleSheet *xlsxStyleSheet, style *Style) (fontID int) {
20522052 fontID = -1
20532053 if styleSheet.Fonts == nil || style.Font == nil {
@@ -2098,7 +2098,7 @@ func (f *File) newFont(style *Style) *xlsxFont {
20982098 }
20992099
21002100 // getNumFmtID provides a function to get number format code ID.
2101-// If given number format code is not exist, will return -1.
2101+// If given number format code does not exist, will return -1.
21022102 func getNumFmtID(styleSheet *xlsxStyleSheet, style *Style) (numFmtID int) {
21032103 numFmtID = -1
21042104 if _, ok := builtInNumFmt[style.NumFmt]; ok {
@@ -2195,7 +2195,7 @@ func setCustomNumFmt(styleSheet *xlsxStyleSheet, style *Style) int {
21952195 }
21962196
21972197 // getCustomNumFmtID provides a function to get custom number format code ID.
2198-// If given custom number format code is not exist, will return -1.
2198+// If given custom number format code does not exist, will return -1.
21992199 func getCustomNumFmtID(styleSheet *xlsxStyleSheet, style *Style) (customNumFmtID int) {
22002200 customNumFmtID = -1
22012201 if styleSheet.NumFmts == nil {
--- a/styles_test.go
+++ b/styles_test.go
@@ -199,7 +199,7 @@ func TestGetConditionalFormats(t *testing.T) {
199199 // Test get conditional formats on no exists worksheet
200200 f := NewFile()
201201 _, err := f.GetConditionalFormats("SheetN")
202- assert.EqualError(t, err, "sheet SheetN is not exist")
202+ assert.EqualError(t, err, "sheet SheetN does not exist")
203203 }
204204
205205 func TestUnsetConditionalFormat(t *testing.T) {
@@ -211,7 +211,7 @@ func TestUnsetConditionalFormat(t *testing.T) {
211211 assert.NoError(t, f.SetConditionalFormat("Sheet1", "A1:A10", fmt.Sprintf(`[{"type":"cell","criteria":">","format":%d,"value":"6"}]`, format)))
212212 assert.NoError(t, f.UnsetConditionalFormat("Sheet1", "A1:A10"))
213213 // Test unset conditional format on not exists worksheet.
214- assert.EqualError(t, f.UnsetConditionalFormat("SheetN", "A1:A10"), "sheet SheetN is not exist")
214+ assert.EqualError(t, f.UnsetConditionalFormat("SheetN", "A1:A10"), "sheet SheetN does not exist")
215215 // Save spreadsheet by the given path.
216216 assert.NoError(t, f.SaveAs(filepath.Join("test", "TestUnsetConditionalFormat.xlsx")))
217217 }
@@ -341,7 +341,7 @@ func TestThemeReader(t *testing.T) {
341341 func TestSetCellStyle(t *testing.T) {
342342 f := NewFile()
343343 // Test set cell style on not exists worksheet.
344- assert.EqualError(t, f.SetCellStyle("SheetN", "A1", "A2", 1), "sheet SheetN is not exist")
344+ assert.EqualError(t, f.SetCellStyle("SheetN", "A1", "A2", 1), "sheet SheetN does not exist")
345345 }
346346
347347 func TestGetStyleID(t *testing.T) {
--- a/table_test.go
+++ b/table_test.go
@@ -30,7 +30,7 @@ func TestAddTable(t *testing.T) {
3030 }
3131
3232 // Test add table in not exist worksheet.
33- assert.EqualError(t, f.AddTable("SheetN", "B26", "A21", `{}`), "sheet SheetN is not exist")
33+ assert.EqualError(t, f.AddTable("SheetN", "B26", "A21", `{}`), "sheet SheetN does not exist")
3434 // Test add table with illegal formatset.
3535 assert.EqualError(t, f.AddTable("Sheet1", "B26", "A21", `{x}`), "invalid character 'x' looking for beginning of object key string")
3636 // Test add table with illegal cell coordinates.
@@ -111,7 +111,7 @@ func TestAutoFilterError(t *testing.T) {
111111 assert.EqualError(t, f.autoFilter("SheetN", "A1", 1, 1, &formatAutoFilter{
112112 Column: "A",
113113 Expression: "",
114- }), "sheet SheetN is not exist")
114+ }), "sheet SheetN does not exist")
115115 assert.EqualError(t, f.autoFilter("Sheet1", "A1", 1, 1, &formatAutoFilter{
116116 Column: "-",
117117 Expression: "-",
Show on old repository browser