Hi
I have an excel file which I have created using aspose.cells, this has date columns which are formatted using custom styles of “dd/mm/yyyy hh:mm” this works fine. However I then re-import this excel (after user updates) using aspose.cells.griddesktop and it seems I can’t format the values to be “dd/mm/yyyy hh:mm” they keep appearing as “m/d/yyyy h:mm”. When the cells in the griddesktop are edited the values change to “dd/mm/yyyy hh:mm” but when editing finishes they change back to “m/d/yyyy h:mm”. How do I get my date columns to display as “dd/mm/yyyy hh:mm”?<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
I am using the latest aspose.cells (7.0.3.07.0.3.0). Here is my code to format the griddesktop date columns to “dd/mm/yyyy hh:mm”
Dim sheet As Aspose.Cells.GridDesktop.Worksheet = agdImport.GetActiveWorksheet
Dim column15 As Aspose.Cells.GridDesktop.GridColumn = sheet.Columns(15)
Dim stDateTime As Aspose.Cells.GridDesktop.Style = column15.GetStyle
stDateTime.Custom = "dd/mm/yyyy hh:mm"
column15.SetStyle(stDateTime)
Dim column16 As Aspose.Cells.GridDesktop.GridColumn = sheet.Columns(16)
stDateTime = column16.GetStyle
stDateTime.Custom = "dd/mm/yyyy hh:mm"
column16.SetStyle(stDateTime)
Regards
Ian