Add NameLocal property to NamedItem object

Add NameLocal property to NamedItem object
0

Upvotes

Upvote

 Feb 02 2024
0 Comments 
New

When Excel is set to a different language, the name property of some Excel-managed range names are localized

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: Any
  • Host [Excel, Word, PowerPoint, etc.]: Excel
  • Office version number: all version supporting office-js
  • Operating System: Win 10
  • Browser (if using Office on the web): Edge

Expected behavior

Return English language name for range names like Print_Area, _FilterDatabase, Print_Titles, "Criteria", "Extract"

Current behavior

The name property of Range names like Print_Area, _FilterDatabase, Print_Titles, "Criteria", "Extract" are returned in local language

in VBA, we have a NameLocal property which returns the localized name, the Name property returns the English name.

Steps to reproduce

  1. Open blank Excel file, set a print area
  2. run this code snippet in Script lab: https://gist.github.com/jkpieterse/7c145cc7464b181c98007987b19f4c4d

Link to live example(s)

  1. Open blank Excel file, set a print area
  2. run this code snippet in Script lab: https://gist.github.com/jkpieterse/7c145cc7464b181c98007987b19f4c4d