Free Support Forum -

Style Custom Format Problem!

Since we retrieved the latest hotfix version - (Nov 3rd) - we are now having a problem with values showing up as blank in our worksheets. They are date values, and the style applied to the cell is defined as:

dateStyle = excel.Styles[styleIndex];

dateStyle.Custom = “mm/dd/yyyy”;

dateStyle.Name = “dateStyle”;

Here is how we are putting in the values:

sheet.Cells[rowCounter, col].PutValue(DateTime.Parse(row[“processed”].ToString()));

This was working quite well until we retrieved the latest hotfix. I rolled back the Aspose.Excell.dll to its previous version and it fixes this problem. However, we need a fix that is included in the latest version. Can this be addressed quickly?

Dear Matthew,
Sorry for any inconvenience.
I tested your code with your previous designer file but didn't find the problem. Are you sure that you are uing the latest hotfix v2.4.2?
And could you elaborate your problem and make a simple test to see if the problem still exists?
Excel excel = new Excel();

Aspose.Excel.Style dateStyle = excel.Styles[excel.Styles.Add()];

dateStyle.Custom = "mm/dd/yyyy";

dateStyle.Name = "dateStyle";

Worksheet sheet = excel.Worksheets[0];
sheet.Cells[0, 0].Style = dateStyle;
excel.Save("book1.xls", SaveType.OpenInExcel, FileFormatType.Default, this.Response);
Thank you very much.