I use NPOI(the .net version of java - Apache POI) created excel sheet. I need to add some dropdown, but I found no matter what list I passed into it, it always split the item value by comma, thus make a new line. In any chance, do you know how to avoid this happen? Here is my code
CellRangeAddressList cellRange = new CellRangeAddressList(cell.RowIndex,
cell.RowIndex, cell.ColumnIndex, cell.ColumnIndex);
DVConstraint constraint = DVConstraint.CreateExplicitListConstraint(new string[]
{"$400","$1,900"});
HSSFDataValidation validation = new HSSFDataValidation(cellRange, constraint);
validation.SuppressDropDownArrow = false;
sheet.AddValidationData(validation);
It always break $1,900 into two items as $1 and 900, here is the screenshot