diff --git a/datavalidation.go b/datavalidation.go index 62d2cf84..914e8776 100644 --- a/datavalidation.go +++ b/datavalidation.go @@ -167,11 +167,11 @@ func convDataValidationOperatior(o DataValidationOperator) string { // object can be created by NewDataValidation function. // // Example 1, set data validation on Sheet1!A1:B2 with validation criteria -// settings, show error alert after invalid data is entered whth "Stop" style +// settings, show error alert after invalid data is entered with "Stop" style // and custom title "error body": // // dvRange := excelize.NewDataValidation(true) -// dvRange.Sqref = "A1:B2" +// dvRange.Sqref = "A1:B2" // dvRange.SetRange(10, 20, excelize.DataValidationTypeWhole, excelize.DataValidationOperatorBetween) // dvRange.SetError(excelize.DataValidationErrorStyleStop, "error title", "error body") // xlsx.AddDataValidation("Sheet1", dvRange) @@ -185,7 +185,7 @@ func convDataValidationOperatior(o DataValidationOperator) string { // dvRange.SetInput("input title", "input body") // xlsx.AddDataValidation("Sheet1", dvRange) // -// Example 4, set data validation on Sheet1!A5:B6 with validation criteria +// Example 3, set data validation on Sheet1!A5:B6 with validation criteria // settings, create in-cell dropdown by allow list source: // // dvRange = excelize.NewDataValidation(true) diff --git a/datavalidation_test.go b/datavalidation_test.go index 718131fe..32f90598 100644 --- a/datavalidation_test.go +++ b/datavalidation_test.go @@ -25,7 +25,7 @@ func TestDataValidation(t *testing.T) { xlsx.AddDataValidation("Sheet1", dvRange) // Test write file to given path. - err := xlsx.SaveAs("./test/Bookdatavalition.xlsx") + err := xlsx.SaveAs("./test/Book_data_validation.xlsx") if err != nil { t.Error(err) }