1

For some reason the Excel chart.style property is only returning a number not the name of the style.

Is it possible to retrieve the applied style name of the chosen chart with the name being returned? If not, is there a function to look up the name of the style by the returned number? If this isn't possible will these numbers change in the future?

j3ff
  • 5,719
  • 8
  • 38
  • 51
jmadd
  • 115
  • 1
  • 1
  • 6

1 Answers1

1

Yes, chart.style property returns or sets the chart style that represented by a number, as there are so many different styles, so we don't give a name for each chart style, so we use number to represent it. (I am thinking about whether we could add name for it, if we do so, we might have to give names for each style, the greater possibility would be style 1, style 2, ...., style n, which would be as same as number)

We should not change the number in the future as one of our design guideline is not breaking existing customers. So I think there might be some possibility to add additional styles in the future, but we won't change the existing style numbers.

enter image description here

Raymond Lu
  • 2,178
  • 1
  • 6
  • 19
  • Thank you Raymond, I see that we can retrieve by number. Good to know that these will not change. Ran into a related issue which is that we are trying to retrieve the applied color style such as "Colorful Palette 1". We are not seeing a method of retrieving this via the API. Am I missing something in the API documentation? – jmadd Apr 16 '20 at 16:12
  • Any thoughts on my follow-up question? I would appreciate it – jmadd Apr 20 '20 at 17:08