I'm using this code to write a date on a cell
mWSheet1.Cells[row, 7] = "01/12/2019";
but when I open the Excel file, it saves "12/01/2019". How can I solve it?
I'm using this code to write a date on a cell
mWSheet1.Cells[row, 7] = "01/12/2019";
but when I open the Excel file, it saves "12/01/2019". How can I solve it?
have you tried passing your date using the Format class? Note that passing the ' in before the value will tell excel to format it as text and it shouldn't try and do its own formatting.
mWSheet1.Cells[row , 7] = "'" + Format("01/12/2019", "MM/dd/yyyy");