Excel - Как ограничить изменение значений списка проверки данных на дату
We are creating a data validation list from C# code. This list will contain Month with year. How can we restrict excel from converting this list from changing to date format? Below is the code:
range.Validation.Add(XlDVType.xlValidateList, XlDVAlertStyle.xlValidAlertInformation, XlFormatConditionOperator.xlBetween, flatList, Type.Missing); range.Validation.IgnoreBlank = false; range.Validation.InCellDropdown = true;
flatList will have values "June 2016, July 2016, August 2016". Excel converts the list to "Jun-2016, Jul-2016, Aug-2016". We want that to be avoided and the list should remain as text. Please advice.
Что я уже пробовал:
Попробовал сделать формат ячейки текстовым, но безуспешно.