qax-os/excelize · error

invalid column name %q

Error message

invalid column name %q

What it means

Error from newInvalidColumnNameError, a validation helper used by column style/width/insert APIs when a column name does not parse as valid letters (e.g. contains digits or punctuation); at fault is the column argument such as "A" or "AB".

Source

Thrown at errors.go:279

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

// newInvalidColumnNameError defined the error message on receiving the
// invalid column name.
func newInvalidColumnNameError(col string) error {
	return fmt.Errorf("invalid column name %q", col)
}

// newInvalidExcelDateError defined the error message on receiving the data
// with negative values.
func newInvalidExcelDateError(dateValue float64) error {
	return fmt.Errorf("invalid date value %f, negative values are not supported", dateValue)
}

// newInvalidLinkTypeError defined the error message on receiving the invalid
// hyper link type.
func newInvalidLinkTypeError(linkType string) error {
	return fmt.Errorf("invalid link type %q", linkType)
}

// newInvalidNameError defined the error message on receiving the invalid
// defined name or table name.
func newInvalidNameError(name string) error {
	return fmt.Errorf("invalid name %q, the name should be starts with a letter or underscore, can not include a space or character, and can not conflict with an existing name in the workbook", name)

View on GitHub (pinned to f2483381fb)

Solutions

  1. Pass pure alphabetic column names
  2. Convert numeric indices with ColumnNumberToName first
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at errors.go:279 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/9bc5e4f75e286df5. Report an issue: GitHub.