Quantcast
Channel: EPPlus Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 2262

Commented Unassigned: sheet.DataValidations.AddListValidation Error [14920]

$
0
0
Consider this code:


```
var dropDown = sheet.DataValidations.AddListValidation(cells[2, colIndex, maxCol, colIndex].Address);
foreach (var bb in brokerBranchs)
{
dropDown.Formula.Values.Add(bb.Title);
}
```
When dropDown count is 29 all thing is ok but when greater than 29 i get error
![Image](https://www.codeplex.com/Download/AttachmentDownload.ashx?ProjectName=epplus&WorkItemId=14920&FileAttachmentId=762783)
Comments: This is because excel stores the values in a comma separated string. This string can unfortunately not be longer than 255 characters. So when you add values like this: Formula.Values.Add("A"); Formula.Values.Add("B"); It is stored like "A,B" in the excel xml. I have on my to-do-list to add a control for this and throw an exception if the length of the string exceeds 255 chars.

Viewing all articles
Browse latest Browse all 2262

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>