Aspose.cells version 24.11.0 : Getting Font size is out of range error

I am using the Aspose.cells version 24.11.0 licensed version in my project. I am getting an error Font size is out of range while accessing the below class
Workbook workbook = new Workbook(“filepath”,options);
provided the below settings
LoadOptions options = new LoadOptions();
options…CheckExcelRestriction = false;

please provide the solution for what other option using for resolving the error with licensed Aspose version

@nkoyi

The “Font size is out of range” error in Aspose.Cells can occur due to various reasons, such as attempting to access a font size that is unsupported or incorrectly set in the Excel file.

To resolve this issue, consider the following steps:

  1. Check Font Size Values: Verify that the font sizes in your Excel file are within the acceptable range, typically between 1 and 409.

  2. Use Default LoadOptions: If you are using custom load options, try loading the workbook with default options to see if the error persists. You can do this by simply creating a Workbook object without any modifications.

  3. Update Aspose.Cells: Ensure that you are using the latest version of Aspose.Cells, as updates may include bug fixes that address this issue.

Here’s a minimal code snippet to load the workbook with default options:

Workbook workbook = new Workbook("filepath");

If the problem continues, examine the specific cells or styles in your Excel file that may be causing the issue.

For further troubleshooting, consult the Aspose.Cells documentation or community forums for similar issues and potential solutions.

I have used default settings as well as latest version of Aspose.cells causing the same problem.it was corrupted file how to handle before load the Workbook.

image.png (7.2 KB)

@nkoyi
Could you share a template file here? We will check it soon.

@nkoyi,

Moreover, if the file is corrupted, it may not load properly in Aspose.Cells. Similarly, Microsoft Excel may display error messages when attempting to open such a file. As a potential solution, you could try opening the file in Microsoft Excel, saving it again, and then using Aspose.Cells APIs to load the saved file into its object model to see if this resolves the issue.

Manually change it should be work but we need to required in the Aspose.Cells. is there any solution in licensed Aspose.Cells

@nkoyi,

There is not better way to cope with it but could you please try latest version/fix: Aspose.Cells v25.9 (Releases | NuGet) as it has more enhancements and fixes?

In case you still find the issue with latest version (Aspose.Cells v25.9), kindly do zip and attach your template Excel file, so we could evaluate your issue precisely on our end.