Fix typo.

This commit is contained in:
xuri 2018-09-02 01:44:32 +08:00
parent b691e617d0
commit 2da107d3b2
No known key found for this signature in database
GPG Key ID: BA5E5BB1C948EDF7
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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)
}