qax-os/excelize · error

incorrect index of column %q

Error message

incorrect index of column %q

What it means

Error from newInvalidAutoFilterColumnError, an autoFilter helper that rejects a filter column name/index that cannot be resolved to a column in the worksheet's auto filter range; at fault is the column argument passed to SetAutoFilter filter operations.

Source

Thrown at errors.go:255

	return fmt.Errorf("chart title field %s value must be an integer from 0 to 100", name)
}

// newCoordinatesToCellNameError defined the error message on converts [X, Y]
// coordinates to alpha-numeric cell name.
func newCoordinatesToCellNameError(col, row int) error {
	return fmt.Errorf("invalid cell reference [%d, %d]", col, row)
}

// newFieldLengthError defined the error message on receiving the field length
// overflow.
func newFieldLengthError(name string) error {
	return fmt.Errorf("field %s must be less than or equal to 255 characters", name)
}

// newInvalidAutoFilterColumnError defined the error message on receiving the
// incorrect index of column.
func newInvalidAutoFilterColumnError(col string) error {
	return fmt.Errorf("incorrect index of column %q", col)
}

// newInvalidAutoFilterExpError defined the error message on receiving the
// incorrect number of tokens in criteria expression.
func newInvalidAutoFilterExpError(exp string) error {
	return fmt.Errorf("incorrect number of tokens in criteria %q", exp)
}

// newInvalidAutoFilterOperatorError defined the error message on receiving the
// incorrect expression operator.
func newInvalidAutoFilterOperatorError(op, exp string) error {
	return fmt.Errorf("the operator %q in expression %q is not valid in relation to Blanks/NonBlanks", op, exp)
}

// newInvalidCellNameError defined the error message on receiving the invalid
// cell name.
func newInvalidCellNameError(cell string) error {
	return fmt.Errorf("invalid cell name %q", cell)

View on GitHub (pinned to f2483381fb)

Solutions

  1. Pass a valid column name within the auto filter range
  2. Set or verify the filter range before applying column filters
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at errors.go:255 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of qax-os/excelize@f2483381fb (2026-09-02). Data as JSON: /api/errors/a60ad817ed82fc81. Report an issue: GitHub.