【发布时间】:2015-06-24 17:50:23
【问题描述】:
如何使用 Open Xml 获取一行中最后一个活动列的索引
我在第 1 行有这个。
Dim activeCells As IEnumerable(Of DocumentFormat.OpenXml.Spreadsheet.Cell) = row.Descendants(Of DocumentFormat.OpenXml.Spreadsheet.Cell)().Where(Function(c) Not String.IsNullOrEmpty(c.InnerText))
Dim cell As DocumentFormat.OpenXml.Spreadsheet.Cell = activeCells.LastOrDefault()
Dim CellRef As String = cell.CellReference
这给出了 D1",但我想要的是这种情况下的索引 "4"。我该怎么做?
【问题讨论】: