This project has moved. For the latest updates, please go here.

Preventing Excel from autoformatting cells to dates

Nov 28, 2012 at 8:28 AM

Hi,

I know i can prevent this problem, by preformatting the cells to Text. (ctrl-1 -> Number tab -> Text ).

But how do i do that with EPPlus ?

Editor
Nov 28, 2012 at 9:42 AM

hum, I'm not in front of pc now and I can't think in another way, but I guess if you set your data as string, probably will do the job.

If you don't have no value to set and you want to prevent when your client are editing the file, maybe you can initialize your cells with string.empty. 

Nov 28, 2012 at 11:37 AM

That didn't work..

What I ended up doing is creating a excel file in which I set the celltype to text, for all cells. And used that as an template...

But why isn't this an property that I can specify on a cell/column/row ?