{
  "$schema": "../_schema.json",
  "format": "xlsx",
  "element": "column",
  "elementAliases": ["col"],
  "parent": "sheet",
  "operations": {
    "add": true,
    "set": true,
    "get": true,
    "query": true,
    "remove": true
  },
  "paths": {
    "positional": ["/SheetName/col[X]"]
  },
  "note": "X is a column letter (A,B,…) or 1-based index. Insert/move/clone at an occupied slot shifts every column at or past the slot right by one, and every range-bearing structure on the sheet (mergeCells, CF/DV sqref, autoFilter, hyperlink/table refs, named ranges, formula cell-refs) follows the displacement. 'add --from /SheetName/col[L]' with --before/--after clones cells + single-col mergeCells; relative formula refs are delta-shifted to the new anchor (Excel 'Insert Copied Cells' parity). Excel-style whole-column references (B:B; B:D spans on set) are accepted as input aliases for col[X]; readback paths stay canonical.",
  "properties": {
    "name": {
      "type": "string",
      "description": "column letter to insert at (e.g. 'C'). If omitted, uses index position or appends.",
      "add": true, "set": false, "get": false,
      "examples": ["--prop name=C"],
      "readback": "n/a (used only for addressing)",
      "enforcement": "strict"
    },
    "width": {
      "type": "length",
      "description": "column width in Excel character units (parsed by ParseColWidthChars). Accepts bare number or unit-qualified.",
      "add": true, "set": true, "get": true,
      "examples": ["--prop width=20"],
      "readback": "raw double (character units)",
      "enforcement": "strict"
    },
    "hidden": {
      "type": "bool",
      "description": "hide column.",
      "add": true, "set": true, "get": true,
      "examples": ["--prop hidden=true"],
      "readback": "true when hidden, key absent otherwise",
      "enforcement": "strict"
    },
    "outline": {
      "type": "int",
      "description": "outline/group level 0-7. Currently Set-only. Aliases: outlineLevel, group.",
      "aliases": ["outlinelevel", "group"],
      "add": false, "set": true, "get": false,
      "examples": ["--prop outline=1"],
      "readback": "not surfaced by Get",
      "enforcement": "report"
    },
    "collapsed": {
      "type": "bool",
      "description": "collapsed column-group flag; omitted from Get when not collapsed.",
      "add": false, "set": true, "get": true,
      "examples": ["--prop collapsed=true"],
      "readback": "true when the column group is collapsed",
      "enforcement": "report"
    },
    "numberformat": {
      "type": "string",
      "description": "Excel format code applied to the whole column via a style ref on col@s (number, date, percentage, currency, text @). Mirrors the cell-level numberformat; resolved back through the column's style index on Get.",
      "aliases": ["numfmt", "format"],
      "add": false, "set": true, "get": true,
      "examples": ["--prop numberformat=\"#,##0.00\"", "--prop numberformat=0.00%", "--prop numberformat=yyyy-mm-dd"],
      "readback": "format string as stored (via col style index)",
      "enforcement": "report"
    },
    "customWidth": {
      "type": "bool",
      "description": "Get-only readback. True when the column has an explicit width set (i.e. width is not the sheet default). Mirrors OOXML col@customWidth.",
      "add": false, "set": false, "get": true,
      "readback": "true when column has explicit width",
      "enforcement": "report"
    },
    "autofit": {
      "type": "bool",
      "description": "auto-fit width to cell content. Set-only by design (meaningless at Add since new column has no data).",
      "add": false, "set": true, "get": false,
      "examples": ["--prop autofit=true"],
      "readback": "resolves to width at Set time",
      "enforcement": "strict"
    }
  }
}
