{"record":{"id":"d7d0a4e07365c63c","repo":"iOfficeAI/OfficeCLI","slug":"unknown-icon-set-name-name-valid-names-3arr","errorCode":null,"errorMessage":"Unknown icon set name: '{name}'. Valid names: 3Arrows, 3ArrowsGray, 3Flags, 3TrafficLights1, 3TrafficLights2, 3Signs, 3Symbols, 3Symbols2, 4Arrows, 4ArrowsGray, 4Rating, 4RedToBlack, 4TrafficLights, 5Arrows, 5ArrowsGray, 5Rating, 5Quarters","messagePattern":"Unknown icon set name: '(.+?)'\\. Valid names: 3Arrows, 3ArrowsGray, 3Flags, 3TrafficLights1, 3TrafficLights2, 3Signs, 3Symbols, 3Symbols2, 4Arrows, 4ArrowsGray, 4Rating, 4RedToBlack, 4TrafficLights, 5Arrows, 5ArrowsGray, 5Rating, 5Quarters","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"src/officecli/Handlers/Excel/ExcelHandler.Helpers.ConditionalFormat.cs","lineNumber":181,"sourceCode":"        {\n            \"3arrows\" => IconSetValues.ThreeArrows,\n            \"3arrowsgray\" => IconSetValues.ThreeArrowsGray,\n            \"3flags\" => IconSetValues.ThreeFlags,\n            \"3trafficlights1\" => IconSetValues.ThreeTrafficLights1,\n            \"3trafficlights2\" => IconSetValues.ThreeTrafficLights2,\n            \"3signs\" => IconSetValues.ThreeSigns,\n            \"3symbols\" => IconSetValues.ThreeSymbols,\n            \"3symbols2\" => IconSetValues.ThreeSymbols2,\n            \"4arrows\" => IconSetValues.FourArrows,\n            \"4arrowsgray\" => IconSetValues.FourArrowsGray,\n            \"4rating\" => IconSetValues.FourRating,\n            \"4redtoblack\" => IconSetValues.FourRedToBlack,\n            \"4trafficlights\" => IconSetValues.FourTrafficLights,\n            \"5arrows\" => IconSetValues.FiveArrows,\n            \"5arrowsgray\" => IconSetValues.FiveArrowsGray,\n            \"5rating\" => IconSetValues.FiveRating,\n            \"5quarters\" => IconSetValues.FiveQuarters,\n            _ => throw new ArgumentException($\"Unknown icon set name: '{name}'. Valid names: 3Arrows, 3ArrowsGray, 3Flags, 3TrafficLights1, 3TrafficLights2, 3Signs, 3Symbols, 3Symbols2, 4Arrows, 4ArrowsGray, 4Rating, 4RedToBlack, 4TrafficLights, 5Arrows, 5ArrowsGray, 5Rating, 5Quarters\")\n        };\n    }\n\n    private static int GetIconCount(string name)\n    {\n        var lower = name.ToLowerInvariant();\n        if (lower.StartsWith(\"5\")) return 5;\n        if (lower.StartsWith(\"4\")) return 4;\n        return 3;\n    }\n\n    /// <summary>\n    /// Build a <x:font> child for a dxf (differentialFormat) from font.* sub-props.\n    /// Supports bold, italic, underline (single/double), strike, size, name, color.\n    /// Returns null if no font sub-props were supplied.\n    /// </summary>\n    internal static Font? BuildFormulaCfFont(Dictionary<string, string> properties)\n    {","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/iOfficeAI/OfficeCLI/blob/1ced45e900782c5083ed550ddf328ee974e425e7/src/officecli/Handlers/Excel/ExcelHandler.Helpers.ConditionalFormat.cs#L163-L199","documentation":"ParseIconSetValues lowercases the icon-set name and switches over the OOXML IconSetValues set; an unmatched name throws. The valid list mirrors the enum (3/4/5-prefixed names). GetIconCount infers the bucket count from the leading digit, so a typo both fails here and would miscount if it slipped through. Called from Add icon-set conditional format (Add.Cf.cs:383) and Set iconset (Set.Tables.cs:880). Matching is case-insensitive.","triggerScenarios":"iconset=3trafficlight1 (typo, missing 's'); iconset=trafficlights; iconset=3Emojis (a name from a newer Excel not in the enum); iconset=three-arrows.","commonSituations":"Hand-typed name with wrong casing/spacing; locale formatting; icon set introduced in a newer Excel version than the OpenXML SDK enum covers.","solutions":["Use an exact name from the valid list (case-insensitive, e.g. '3TrafficLights1').","Omit iconset to accept the default '3TrafficLights1'.","Round-trip via Get on an existing rule to see the canonical name string.","Validate against a whitelist before calling Add/Set."],"exampleFix":"// before\nprops[\"iconset\"] = \"3trafficlight1\";  // typo -> throw\n\n// after\nprops[\"iconset\"] = \"3TrafficLights1\";\n// or simply omit for the default","handlingStrategy":"validation","validationCode":"static readonly HashSet<string> ValidIconSets = new(StringComparer.OrdinalIgnoreCase)\n{ \"3Arrows\",\"3ArrowsGray\",\"3Flags\",\"3TrafficLights1\",\"3TrafficLights2\",\"3Signs\",\n  \"3Symbols\",\"3Symbols2\",\"4Arrows\",\"4ArrowsGray\",\"4Rating\",\"4RedToBlack\",\n  \"4TrafficLights\",\"5Arrows\",\"5ArrowsGray\",\"5Rating\",\"5Quarters\" };\n\nif (!ValidIconSets.Contains(name))\n    throw new ArgumentException($\"Unknown icon set '{name}'. Valid: {string.Join(\", \", ValidIconSets)}\");","typeGuard":"static bool IsValidIconSet(string name) =>\n    (new[] { \"3Arrows\",\"3ArrowsGray\",\"3Flags\",\"3TrafficLights1\",\"3TrafficLights2\",\"3Signs\",\n      \"3Symbols\",\"3Symbols2\",\"4Arrows\",\"4ArrowsGray\",\"4Rating\",\"4RedToBlack\",\n      \"4TrafficLights\",\"5Arrows\",\"5ArrowsGray\",\"5Rating\",\"5Quarters\" })\n    .Contains(name, StringComparer.OrdinalIgnoreCase);","tryCatchPattern":null,"preventionTips":["Use an exact name from the IconSetValues enum (case-insensitive).","Omit iconset to accept the '3TrafficLights1' default.","Round-trip via Get to read the canonical name from an existing rule.","Whitelist-validate before Add/Set icon-set conditional formats."],"tags":["excel","ooxml","conditional-format","iconset","validation"],"backgroundTag":null,"analyzedSha":"1ced45e900782c5083ed550ddf328ee974e425e7","analyzedAt":"2026-08-13T13:01:07.193Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}