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

Column AutoFit With Formulas

Apr 29, 2014 at 2:34 PM
First off, thank you for your hard work on this project. It has helped me greatly.

As for my question, I believe I read somewhere that Column AutoFit wouldn't work great due to the lack of formula calculation. With formula calculation being added in 4.0 this should make Column AutoFit work much better. I have seen things improve in my own worksheets but still see some "########" here and there. Is there anything else that might need to be added to get this working so that we don't see any "########"?
Apr 29, 2014 at 3:01 PM
Yes, in previous releases it isn't a case of work poorly or greatly, doens't work it all in case of formula because EPPlus don't have a calculation engine.

I didn't have time to test this new beta release but I took a look at the code and there was some modifications in AutoFit Method, so if you call formula calculation before autofit, everything should work fine.
Apr 29, 2014 at 6:31 PM
Edited Apr 29, 2014 at 6:31 PM
Thanks. I found the issue with why I was seeing "########". I was populating the Formula property with an equal sign at the beginning which was causing the calculation to fail. I fixed that and now it is running beautifully.

I just implemented being able to sort on a formula column to my code which would not have been possible without the Formula Calculator. Thanks for those involved in its development.