{"record":{"id":"aa049366347880fb","repo":"qax-os/excelize","slug":"errcellcharslength","errorCode":"ErrCellCharsLength","errorMessage":"cell value must be 0-%d characters","messagePattern":"cell value must be 0-(.+?) characters","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"errors.go","lineNumber":29,"sourceCode":"\npackage excelize\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n)\n\nvar (\n\t// ErrAddVBAProject defined the error message on add the VBA project in\n\t// the workbook.\n\tErrAddVBAProject = errors.New(\"unsupported VBA project\")\n\t// ErrAttrValBool defined the error message on marshal and unmarshal\n\t// boolean type XML attribute.\n\tErrAttrValBool = errors.New(\"unexpected child of attrValBool\")\n\t// ErrCellCharsLength defined the error message for receiving a cell\n\t// characters length that exceeds the limit.\n\tErrCellCharsLength = fmt.Errorf(\"cell value must be 0-%d characters\", TotalCellChars)\n\t// ErrCellStyles defined the error message on cell styles exceeds the limit.\n\tErrCellStyles = fmt.Errorf(\"the cell styles exceeds the %d limit\", MaxCellStyles)\n\t// ErrChartTitle defined the error message on both formula and rich text for\n\t// chart title.\n\tErrChartTitle = errors.New(\"cannot set both 'Formula' and 'Paragraph' for chart title\")\n\t// ErrColumnNumber defined the error message on receive an invalid column\n\t// number.\n\tErrColumnNumber = fmt.Errorf(\"the column number must be greater than or equal to %d and less than or equal to %d\", MinColumns, MaxColumns)\n\t// ErrColumnWidth defined the error message on receive an invalid column\n\t// width.\n\tErrColumnWidth = fmt.Errorf(\"the width of the column must be less than or equal to %d characters\", MaxColumnWidth)\n\t// ErrCoordinates defined the error message on invalid coordinates tuples\n\t// length.\n\tErrCoordinates = errors.New(\"coordinates length must be 4\")\n\t// ErrCustomNumFmt defined the error message on receive the empty custom\n\t// number format.\n\tErrCustomNumFmt = errors.New(\"custom number format can not be empty\")\n\t// ErrDataValidationFormulaLength defined the error message for receiving a","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/qax-os/excelize/blob/f2483381fbfbe432a6baa98d48a1c277183f3285/errors.go#L11-L47","documentation":"Formatted error ErrCellCharsLength returned by SetCellRichText when the cumulative UTF-16 code-unit count of all rich text runs exceeds TotalCellChars (32767), Excel's per-cell character limit; a generic input-size guard, at fault is the combined length of the RichTextRun texts.","triggerScenarios":"Thrown at errors.go:29 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Split the content across multiple cells","Trim or truncate the run texts to fit within TotalCellChars","Use SetCellStr for plain text if rich formatting is not required"],"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"}