I just find the text if like this "Tue 23/10/12", and i assign it to the value of the cell, it will automatically cut the "Tue" and it becomes "23/10/12".
and if the text is "6:00" it will automatically recognized as time format and set to "6:00:00".
This makes me very annoying ! How can i set the content as original as it is?
Comments: This is the bane of my existence. In the beginning I tried to make ClosedXML behave as close to Excel as possible. That wasn't such a good idea after all. In your case the text is being converted to DateTime values (like Excel does). You have 3 options: #1 Format the date in the cells #2 Use cell.SetValue(string) instead #3 put an apostrophe at the beginning of the string e.g. '6:00'
and if the text is "6:00" it will automatically recognized as time format and set to "6:00:00".
This makes me very annoying ! How can i set the content as original as it is?
Comments: This is the bane of my existence. In the beginning I tried to make ClosedXML behave as close to Excel as possible. That wasn't such a good idea after all. In your case the text is being converted to DateTime values (like Excel does). You have 3 options: #1 Format the date in the cells #2 Use cell.SetValue(string) instead #3 put an apostrophe at the beginning of the string e.g. '6:00'