is DateUtil.IsCellDateFormatted() correctly working?

Jun 5, 2012 at 1:11 PM

Hi,

I'm using the method DateUtil.IsCellDateFormatted() to determine if a cell contains a date or not.

if (DateUtil.IsCellDateFormatted(cell))
                        result = DateUtil.GetJavaDate(cell.NumericCellValue).ToShortDateString();

However, when a cell is not Date-formatted this method throw an InvalidOperationException.

Is this intended?

Coordinator
Jul 26, 2012 at 11:18 PM

There should not be a exception. What's your data in the cell?

Oct 24, 2012 at 1:47 PM
Edited Oct 24, 2012 at 1:52 PM

When you use DateUtil.IsCellDateFormatted() on a cell which contains text, this exception is raised.

Dec 4, 2012 at 8:31 AM

Any chance to have this updated?