I am processing an XML in Excel, and I want to export the final value to a file. The XML is in a cell, and I am writing it using Open and Write of VBA. While doing so, I get the XML from the Cell all within one pair of quotes. The values of tag attributes (which are in quotes) get escaped with another quote.
Below is how it looks in the Cell.
<tag attr="value"/><tag>
And this is how it gets exported to file.
"<tag attr=""value""/><tag>"
I am using
Open myFilePath For Output as #1
Write #1, WorkSheets("Sheet1").Cells(1,2).Value
Close #1