请帮助我了解如何在 VB.NET 块中插入 XML Literals 中的一些操作,例如:iCol = iCol + 1 iTMP = iTmp + iCol(例如在循环中,我需要在 insertinf New Tag 之前增加一些变量)
Dim objDoc As XDocument = <?xml version="1.0" encoding="utf-8" standalone="no"?>
. . .
<%= From i In Enumerable.Range(3, LastRow)
Where UCase(Globals.ThisAddIn.Application.ActiveWorkbook.ActiveSheet.Range("Y" + CStr(i)).Value) = "Y" Select
iCol = iCol + 1
iTMP = iTmp + iCol
<TagWithData>Globals.ThisAddIn.Application.ActiveWorkbook.ActiveSheet.Range("Y" + CStr(iTMP)).Value</TagWithData>
. . .