Posts mit dem Label Excel werden angezeigt. Alle Posts anzeigen
Posts mit dem Label Excel werden angezeigt. Alle Posts anzeigen

Montag, 12. August 2013

COMException: Die NumberFormat-Eigenschaft des Range-Objektes kann nicht Festgelegt werden

The error in english is:
Unable to set the NumberFormat property of the Range Class

Solution:
In Excel you have two Fields:

  • NumberFormat
  • NumberFormatLocal
NumberFormat takes the format always locale invariant in the american standard and NumberFormatLocal expects the format with the locale formatting string.

Out of memory exception when setting an excel chart name

xlChart.Name = "A name";

This property is read-only for chart objects (embedded charts).

Solution:
The charts are "floating" on the page (not sepearate chart sheets), so the "read-only" remark applies and explains why you're getting an error. A seperate "chart only sheet" can have a name via this property.