Measure the Width and Height of the Cell Value in Unit of Pixels with Golang via C++
Contents
[
Hide
]
Sometimes you need to calculate the width and height of the cell value to fit it inside the cell. Aspose.Cells provides Cell.GetWidthOfValue() and Cell.GetHeightOfValue() methods for this purpose. By using these methods, you can calculate the width and height of the cell value, then set the column width and row height for that cell respectively, which will adjust the cell to fit the value.
Alternatively, you can also autofit rows and columns of your cells or a range of cells using Aspose.Cells APIs.
The following code explains the use of Cell.GetWidthOfValue() and Cell.GetHeightOfValue() methods.