Format Persistence When Setting Cell Value

Mar 15, 2011 at 4:53 PM

When setting a cell's datatype as a DateTime, and then setting the value the cell.Style property has suddenly changed with no regard to the way the cell's DateFormat was set previously.  I imagine there are similar problems with other DataTypes as well.  I mean obviously there is a workaround for me to copy the DateFormat before the setting of the cell.Value, but I would expect that I shouldn't have to do this.

            if(tag.StartsWith("#[_D_") && DateTime.TryParse(value, out dateTime))
                cell.Value = "";
                cell.DataType = XLCellValues.DateTime;
		//after this next line is executed the cell.Style's DateFormat is different
                cell.Value = dateTime;

Mar 16, 2011 at 3:07 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Mar 16, 2011 at 11:01 PM

Fixed on v0.47.1