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

DateTime-Format with /

Mar 12, 2013 at 3:51 PM
Edited Mar 12, 2013 at 3:51 PM
first: THANK YOU a lot for sharing this library! This library is just awesome!

i'm using sheet.Cell(2, 1).InsertData(IEnumerable<T>) for adding cell-informations. Some of the Cells are DateTime. We force all DateTimes to be like 31/10/2008.

so i added the following code to modify after the insert the DateFormat:
foreach (var cell in sheet.Range(1, 1, objectlist.Count() + 1, headers.Count).CellsUsed(c => c.DataType == XLCellValues.DateTime))
                cell.Style.DateFormat.Format = "dd/MM/yyyy";
this works well if i use "dd-MM-yyyy". But when i'll use dd/MM/yyyy, then it will be 12.01.2010 (like my current OS region info is).

Is there a way to force those '/'`?

Thank you for any tips...