powershell and indexer property
If an indexer in C# is expressed as: index[1, 1]. How would you express this with powershell?
To be more specific, I'm trying to use EPPlus with Powershell to generate excel documents. However I'm having a problem select cells using its cell index property.
I posted a thread on Epplus' 开发者_高级运维discussion forum but I'm not entirely sure where to go from there.
WorkBook.Cells
is an ExcelRange object that provides access to cell via Indexers.
Indexers are syntactic sugar that don't translate directly to PowerShell, use this instead:
$WorkSheet.Cells.Item(1,1).Value = "Cell 1"
精彩评论