chetankotwal's avatar
chetankotwal
Iron Contributor
Aug 28, 2025
Status:
New

Ability to Assign Custom Properties or Unique IDs to Individual Cells

 

Summary
I'd like to request support for assigning custom metadata — such as unique IDs or arbitrary key-value pairs — directly to individual cells in Excel using the Office.js API.

Why This Matters
Currently, developers must rely on workarounds like named ranges, hidden metadata sheets, or cell notes to simulate per-cell identifiers. These approaches are either limited, fragile, or not scalable for large applications. Native support for cell-level metadata would unlock powerful use cases:

  • Dynamic form builders
  • Cell-level validation engines
  • Workflow tracking
  • Data lineage and audit trails
  • Integration with external systems via stable cell references

Proposed API Concept

range.customProperties.add("id", "cell_001");

const id = range.customProperties.getItem("id").value;

Or even:

range.metadata = {

  id: "cell_001",

  status: "approved",

  validator: "admin"

};

Benefits

  • Eliminates reliance on fragile naming conventions
  • Enables scalable, structured metadata management
  • Improves developer experience and app robustness

Alternatives Considered

  • Named ranges: limited and global scope
  • Notes/comments: visible to users, not structured
  • Hidden metadata sheets: hard to maintain
  • Custom XML parts: complex and not cell-specific

Request
Please consider adding support for cell-level metadata or custom properties in a future version of Office.js. Even a lightweight key-value store per cell would be a game-changer.

 

2 Comments

  • James1981's avatar
    James1981
    Copper Contributor

    Could you not use EntityCellValue interface? https://learn.microsoft.com/en-us/javascript/api/excel/excel.entitycellvalue?view=excel-js-preview


    https://learn.microsoft.com/en-us/office/dev/add-ins/excel/excel-data-types-entity-card

    • chetankotwal's avatar
      chetankotwal
      Iron Contributor

      Hi James1981​ ,

       Thanks for the suggestion. But I think entitycellvalue interface primarily used for entity cards and linked data types. You can’t arbitrarily assign it to a cell unless the cell is bound to an entity source. Also it doesn’t guarantee persistence or movement with the cell during structural changes.