You can certainly do what you are seeking by using a raw text format (using @
), but there may be advantages to treating the field as a date, in which case the format is definitely possible. For example, if you sort on this field as text, "Feb 19" will come before "Jan 19," which is probably not what you want.
The raw text solution is simply:
ws.Cells[1, 1].NumberFormat = "@";
ws.Cells[1, 1].Value = "Jan 19";
Presumably, you mean January 2019, in which case any reasonable date format (based on your locale) would result in a date within January, and then a format of mmm yy would render that as "Jan 19:"
ws.Cells[2, 1].Value = "1-Jan-2019";
ws.Cells[2, 1].NumberFormat = "mmm yy";
And just to prove this works, the notion of an Excel date (the number of days after 1/1/1900 or something similar) should even work directly:
ws.Cells[3, 1].Value = "43466";
ws.Cells[3, 1].NumberFormat = "mmm yy";
These last two methods will retain the format you desire and still treat the cells as values that enable sorting and math.
Here are the results of the above three statements:

Interestingly I am guessing the "Jan-19" was probably translated to 1/19/2018, which I am guessing is not what you intended.