Help me please to understand how possible to insert inside XML Literals in VB.NET block of some actions like this: iCol = iCol + 1 iTMP = iTmp + iCol (for example in Loop i need to increase some variable before 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>
. . .
XmlLiterals are designed for binding data into the XDocument. If you have something more complicated you wish to do then try declaring an anonymous function and binding that instead.
This has the benefit of removing more complicated logic out of the document.