We are using Aspose Cells.Net.
We would like to know if a cell contains text which overflows to the next cells. Please let us know what property to use, to check this.
Thanks in advance!
We are using Aspose Cells.Net.
Hi,
I like the example given by Amjad, here is another approach.
I have used System.Windows.Forms.TextRenderer class to measure the text size in pixels. Given the font name and font size, TextRenderer.MeasureText method will return the size of the string in unit of pixels.
We will then compare both cell’s column width and cell’s string width and decide if the cell is overflowing or not.
Please see the code below.
C#
Thanks Shakeel. I will definitely look into this.
Amjad, Although we have not tested it, your solution is fantastic.