qax-os/excelize · error
invalid date value %f, negative values are not supported
Error message
invalid date value %f, negative values are not supported
What it means
Error from newInvalidExcelDateError, returned by ExcelDateToTime when the Excel serial date is negative, which has no calendar representation in this library; at fault is the raw serial float read from or passed for conversion.
Source
Thrown at errors.go:285
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)
}
// 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, ", "))View on GitHub (pinned to f2483381fb)
Solutions
- Guard serial values >= 0 before conversion
- Reject or sanitize the source cell value that produced the negative serial
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at errors.go:285 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/355e4ccf0d8fb979.
Report an issue: GitHub.