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

Auto Fit Columns

Feb 1, 2010 at 7:45 PM
Edited Feb 1, 2010 at 7:45 PM

Very impressive work.  I tried the original ExcelPackage and it was far too slow.  You have certainly improved the speed a lot.  And I like all the styles.

Now for my question - is there any way to auto fit columns?  This is very important to me.  Also, is it possible to freeze the top line (for keeping headers on the page)?

Thanks for your answers in advance.  And thanks for taking the time to create such a useful tool.


Feb 2, 2010 at 8:10 AM


I have not implemented an Autofit method, because it would be very hard to get it to work as expected.

Since you need to measure the formated text that means you have to implement ExcelNumber-formats and calculate output from formulas, and thats just to much work to do.

I plan to implement panes in a future version,but for now you can use a template file where you "freezed" the top line.

Hope this helps


Feb 2, 2010 at 2:35 PM

Thanks for your reply.  I didn't realize it was so complicated - I thought it might be one of the Excel styles, since that's where it is in the Excel menus.  At least I was hoping.  I guess I can always set up a template with a macro to autofit columns - and with the top line frozen.  Thanks again!



Jan 12, 2012 at 3:00 PM


Do you still plan to implement this feature in the future? I am eagar :)

- Chris