All Collections
Helpful Info and Troubleshooting
Messages
Error: Unable to set the NumberFormat property of the Range class
Error: Unable to set the NumberFormat property of the Range class
Gabriel Michaud avatar
Written by Gabriel Michaud
Updated over a week ago

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.

Did this answer your question?