This project has moved and is read-only. For the latest updates, please go here.

Columns().AdjustToContents leaving extra padding

Aug 14, 2013 at 6:54 PM
I'm adjusting a series of columns and rows. It is working and I can see that the columns widths have been adjusted. However, they are not adjusting to the same width as it would if I were to manually select all the columns and rows and select Format > AutoFit Column Width. It almost seems that its adding some padding or allowing for some padding in the Columns().AdjustToContents logic (see attached image for an example). Is there another setting that needs to be applied or am I using ws.Columns().AdjustToContents(startRow, endRow) incorrectly?
Image
Aug 15, 2013 at 4:11 AM
Well, that is the best I can do for that function ^_^

The problem is that I have to take into account text length, size, font, weight, orientation, and I don't remember what else to come up with a size that "will most likely" fit the text.