Check Custom Number Format when Setting Style.Custom Property

Possible Usage Scenarios

If you assign invalid custom number format to Style.custom property, then Aspose.Cells will not throw any exception. But if you want that Aspose.Cells should check if the assigned custom number format is valid or not, then please set the Workbook.settings.check_custom_number_format property to true.

Check Custom Number Format when setting Style.Custom property

The following sample code assigns an invalid custom number format to Style.custom property. Since, we have already set Workbook.settings.check_custom_number_format property to true, therefore it throws exception e.g. Invalid number format. Please read the comments inside the code for more help.

Sample Code