Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

Edited Unassigned: ExcelApi.FormatConditions throws error during enumeration [20112]

$
0
0
ExcelApi.FormatConditions.GetEnumerator() throws an exception when iterating through existing formats in a sheet when the sheet has an IconSetCondition

Fix is to change the IEnumerable to object (from FormatCondition) and then check on the calling end what type of format is being processed.

```
public class FormatConditions : COMObject ,IEnumerable<object>

.. snip..

[SupportByVersionAttribute("Excel", 9,10,11,12,14,15)]
public IEnumerator<object> GetEnumerator()
{
NetRuntimeSystem.Collections.IEnumerable innerEnumerator = (this as NetRuntimeSystem.Collections.IEnumerable);
foreach (object item in innerEnumerator)
yield return item;
}
```

Viewing all articles
Browse latest Browse all 1741

Trending Articles



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