Check Custom Number Format when Setting Style.Custom Property with Golang via C++

Possible Usage Scenarios

If you assign an invalid custom number format to Style.GetCustom() property, Aspose.Cells will not throw an exception. But if you want Aspose.Cells to check whether the assigned custom number format is valid, then set the Workbook.GetCheckCustomNumberFormat() property to true.

Check Custom Number Format when setting Style.Custom property

The following sample code assigns an invalid custom number format to Style.GetCustom() property. Since we have set Workbook.GetCheckCustomNumberFormat() property to true, it throws an exception, e.g., “Invalid number format.” Please read the comments inside the code for more help.

Sample Code