{"record":{"id":"a4d3dbd67d0a1c87","repo":"qax-os/excelize","slug":"incorrect-number-of-tokens-in-criteria-q","errorCode":null,"errorMessage":"incorrect number of tokens in criteria %q","messagePattern":"incorrect number of tokens in criteria %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"errors.go","lineNumber":261,"sourceCode":"\treturn fmt.Errorf(\"invalid cell reference [%d, %d]\", col, row)\n}\n\n// newFieldLengthError defined the error message on receiving the field length\n// overflow.\nfunc newFieldLengthError(name string) error {\n\treturn fmt.Errorf(\"field %s must be less than or equal to 255 characters\", name)\n}\n\n// newInvalidAutoFilterColumnError defined the error message on receiving the\n// incorrect index of column.\nfunc newInvalidAutoFilterColumnError(col string) error {\n\treturn fmt.Errorf(\"incorrect index of column %q\", col)\n}\n\n// newInvalidAutoFilterExpError defined the error message on receiving the\n// incorrect number of tokens in criteria expression.\nfunc newInvalidAutoFilterExpError(exp string) error {\n\treturn fmt.Errorf(\"incorrect number of tokens in criteria %q\", exp)\n}\n\n// newInvalidAutoFilterOperatorError defined the error message on receiving the\n// incorrect expression operator.\nfunc newInvalidAutoFilterOperatorError(op, exp string) error {\n\treturn fmt.Errorf(\"the operator %q in expression %q is not valid in relation to Blanks/NonBlanks\", op, exp)\n}\n\n// newInvalidCellNameError defined the error message on receiving the invalid\n// cell name.\nfunc newInvalidCellNameError(cell string) error {\n\treturn fmt.Errorf(\"invalid cell name %q\", cell)\n}\n\n// newInvalidColumnNameError defined the error message on receiving the\n// invalid column name.\nfunc newInvalidColumnNameError(col string) error {\n\treturn fmt.Errorf(\"invalid column name %q\", col)","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/qax-os/excelize/blob/f2483381fbfbe432a6baa98d48a1c277183f3285/errors.go#L243-L279","documentation":"Error from newInvalidAutoFilterExpError, an autoFilter helper raised when a filter criteria expression does not split into the expected number of tokens (operator plus operand); at fault is the criteria string passed to auto filter APIs.","triggerScenarios":"Thrown at errors.go:261 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reformat the criteria as `<operator> <value>`","Quote values containing spaces so tokenization succeeds"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2483381fbfbe432a6baa98d48a1c277183f3285","analyzedAt":"2026-09-02T01:26:19.299Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}