Free Support Forum - aspose.com

How to: Smart Column Formatting

Is there a way to have smart column formatting - that is lets say I have a two Column spreadsheet like so:

A B

1 Hello World 17

2 The is a ong piece of text that spans several cells

-----------------

Is there a way to determine whether a row within the column *should* be used in the calcuation to AutoFit the column - that is, if the text in Column A's adjacent cells are empty, then there's no reason on an autofit to make the column any wider - for instance, if A1 would spill over a bit into B1, then column A should be at least as wide as A1, but since A2's neighbors (B2...) are empty, there's no reason to make A any wider than A1.

Hi,

Please compare the width(in unit of pixels) of the string value of the cell with the column width(in unit of pixels) to get whether this column should be auto fitted.