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

Created Unassigned: Worksheet.Range is not an indexer (C#) [22314]

$
0
0
In the standard libraries, Worksheet.Range is implemented as an indexer, but in NetOffice it is a simple method. This strikes me as weird since .Cells[] and .Offset[] both are indexers, using [] instead of ().

Standard Excel Interop:
```
var formattingRange = pivotSheet.Range[firstCell, lastCell];
```

NetOffice:
```
var formattingRange = pivotSheet.Range(firstCell, lastCell);
```

I had to edit some 400 instances of this when I converted a project to NetOffice, so I think I'm not the only one who would appreciate support for the .Range[a, b] syntax.

Viewing all articles
Browse latest Browse all 1741

Trending Articles



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