qax-os/excelize · error

invalid %s value %q, acceptable value should be one of %s

Error message

invalid %s value %q, acceptable value should be one of %s

What it means

Error from newInvalidOptionalValue, a generic validation helper that reports an unsupported value for a named option; raised from graphic-options parsing (pictures, shapes, charts) when a field like a placement or printing option is not in the accepted set.

Source

Thrown at errors.go:303

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

// newInvalidOptionalValue defined the error message on receiving the invalid
// optional value.
func newInvalidOptionalValue(name, value string, values []string) error {
	return fmt.Errorf("invalid %s value %q, acceptable value should be one of %s", name, value, strings.Join(values, ", "))
}

// newInvalidRowNumberError defined the error message on receiving the invalid
// row number.
func newInvalidRowNumberError(row int) error {
	return fmt.Errorf("invalid row number %d", row)
}

// newInvalidSharedStringIndex defined the error message on receive an invalid
// shared string index.
func newInvalidSharedStringIndex(idx int) error {
	return fmt.Errorf("invalid shared string index %d", idx)
}

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

View on GitHub (pinned to f2483381fb)

Solutions

  1. Use one of the enumerated acceptable values listed in the message
  2. Check the option's documented constants before setting it
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at errors.go:303 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/84fa5efa858db418. Report an issue: GitHub.