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

Format Persistence When Setting Cell Value

Mar 15, 2011 at 5: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 4:07 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Mar 17, 2011 at 12:01 AM

Fixed on v0.47.1