Error: Unable to set the NumberFormat property of the Range class

Created by Damien Zwillinger, Modified on Fri, 1 Sep, 2023 at 2:21 AM by Damien Zwillinger

Applies to:

  • Velixo NX
  • Velixo Classic
  • Every ERP


Symptom

When performing a drill-down, an error message may occur.

 

Text from the error message:

 

System.Runtime.InteropServices.COMException (0x800A03EC): Unable to set the NumberFormat property of the Range class 

at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) 

at Microsoft.Office.Interop.Excel.Range.set_NumberFormat(Object )

at Velixo.Reports.GLHistoryDrilldown.g__FillCell|2_0(DrilldownColumns column, Object numberFormat, Object value, <>c__DisplayClass2_0& ) in C:\Dev\Velixo-Reports-Pro\Velixo.Reports\GLHistoryDrilldown.cs:line 110

at Velixo.Reports.GLHistoryDrilldown.FillRow(Range row, DrilldownData data) in C:\Dev\Velixo-Reports-Pro\Velixo.Reports\GLHistoryDrilldown.cs:line 100 

at CallSite.Target(Closure , CallSite , IDrilldownFormatter , Object , DrilldownData )

at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3[T0,T1,T2](CallSite site, T0 arg0, T1 arg1, T2 arg2)

at CallSite.Target(Closure , CallSite , IDrilldownFormatter , Object , DrilldownData )

at Velixo.Reports.DrilldownHelper.ShowDrilldownResults(IEnumerable`1 collectedData) in C:\Dev\Velixo-Reports-Pro\Velixo.Reports\DrilldownHelper.cs:line 212 

at Velixo.Reports.DrilldownHelper.OnDrilldownClick() in C:\Dev\Velixo-Reports-Pro\Velixo.Reports\DrilldownHelper.cs:line 37 

at Velixo.Reports.Ribbon.Attempt(Action action) in C:\Dev\Velixo-Reports-Pro\Velixo.Reports\Ribbon.cs:line 242

Cause

The file has too many custom number formats.

 

too_many_formats.png


Resolution

The resolution is to choose the Custom category in the Format Cells popup window and delete all unused formats.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article