@mitnet,
Thanks for your query.
Well, although I am not entirely certain about your needs. But, I think as we do provide a method, i.e., Cell.GetWidthOfValue() which you may use to check the rough width needed by the cell value (it might not be accurate all the time), so you may use this method to detect the width for the cell in the column. You can compare the width with what you get with Cells.getColumnWidth() for the particular column. So, if it is greater/less than column’s width, you can think the text (in the cell) is overflown. And, here comes the wrapping text to place text in multiple lines.
e.g
Sample code:
Workbook workbook = new Workbook(path + "Book1.xlsx");
Cell cell = workbook.Worksheets[0].Cells["A1"];
int width = cell.GetWidthOfValue();
int columnWidth = workbook.Worksheets[0].Cells.GetColumnWidthPixel(0);
if (width > columnWidth)
{
Console.WriteLine("textOverflow");
//Your code goes here.
//...........
}
You have to browse cells in the row to calculate/detect which cell’s data are overflown and you have to wrap text for those cells by applying the style to it.
Hope, this helps a bit.