Follow

"Unable to set the NumberFormat Property of the Range Class" Issue with specific files.

Issue: When you try a apply a NumberFormant or insert a Chart into your workbook, a message saying "Unable to Set the NumberFormat Property of the Range Class" appears.


NumberFormat_1.PNG

NumberFormat_2.PNG

Explanation: This issue is caused by a limit on the number of custom number formats per Excel file.

Excel keeps adding new ones on your request but never deletes them when they are no longer used.

You can check the file number format by opening the Cell Styles window. 

NumberFormat_.PNG

In the picture above is an example where the limit has been reached (this limit depends on a number of parameters, but in this particular case it was 3000).

Resolution

If you have the Modeling Tools licence you can use the Clean Function to remove all unused cell styles on the file and this will also remove the number formats.

NumberFormat_5.PNG

Make sure that the Option "Remove all unused styles" is checked before applying the clean: 

NumberFormat_4.PNG

NumberFormat_6.PNG

 

Alternative Solutions

If you don't have the Modeling Tools Licence, you can either delete each numberformat manually, or use the tool called XLStylesTool created by Sergei Gundorov and available here.

Open the software, load your Excel File and Clean the file y using "Process File" function: 

NumberFormat_3.PNG

If you still have issues with this error message after cleaning your file, please contact UpSlide Support by using the "Signal an Issue to Support" function.

 

NumberFormat_8.png

 

 

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk