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

Specifying field as numbers instead of text

Sep 7, 2011 at 11:50 PM

The Excel files I create don't support the auto Sum/Avg in the status bar.  I first have to hit the "Data->Text to Columns" button in Excel to get them to be treated as numbers and support the auto Sum/Avg in the status bar.

Either through the EPPlus API, or by editing the template file, how do I indicate fields should be treated as numbers.  The number formatting doesn't seem to affect this.

Sep 9, 2011 at 8:40 AM

I think you're filling cells values with strings instead of numbers, (or your templates file cells are formatted as text)... arent you ?

ws.Cells["A1"].Value = 12;

ws.Cells["A2"].Value = "12";

does not produce the same result.