We have just released this month’s improvements to Aspose.Cells for .NET by upgrading the API to version 8.2.1. This release contains 30 improvements, including the features showcased below. You can download the latest Aspose.Cells for .NET release from the download section now, and start exploring the new features.
Get Data Validation Rules of a Cell in Excel
Aspose.Cells for .NET is an easy to use spreadsheet creation, manipulation, and conversion API that provides all the features that Microsoft Excel provides. Cell validation is one of the features that spreadsheet designers use to stop users from inserting invalid values into a particular cell. With the release of Aspose.Cells for .NET 8.2.1, the API has exposed a simple mechanism that identifies if data validation has been applied on a cell. Use the Cell.GetValidation method to acquire any applied validation. If there is no validation, the method returns null. Similarly, use Validations.GetValidationInCell method to acquire the validation applied on any cell by providing its row and column indices.
The following code sample shows how to get validation applied to a cell in Excel using C#.
Read more about cell validation.
Verification of Cell Data Validation Rules in Excel
In addition to determining whether validation has been applied, you can also verify if a given value satisfies the data validation rules for a particular cell. This feature is useful in scenarios when you want to verify if the value entered in the cell satisfies the data validation rules on the fly. The Aspose.Cells API has exposed the GetValidationValue method for the Cell class. If the value entered in a cell does not satisfy the data validation rules, the Cell.GetValidationValue method returns false. The following code sample shows how to verify the data validation rules in C#.
Find the Absolute Position of Shape in Worksheet
Prior to the release of Aspose.Cells for .NET 8.2.1, it was not easy to calculate the absolute position of a given shape in a worksheet. The latest revision of Aspose.Cells for .NET has exposed a simple mechanism for achieving this by exposing the LeftToCorner and TopToCorner properties for the Shape class. These properties store the absolute position of the shape inside the worksheet in the unit of pixels. The following code sample shows how to find the absolute position of shapes in an Excel worksheet.
Please read more about finding the absolute position of shape in a worksheet.
Other Enhancements and Fixes
We have fixed a number of critical issues with this release. The most noteworthy problems that version 8.2.1 has fixed are listed below.
- Fixed a few problems that caused the System.ArgumentException & System.IndexOutOfRangeException.
- Improved the features related to the hyperlinks in a spreadsheet.
- Enhanced the PDF rendering engine to improve the fidelity of rendered shapes, charts & page breaks.