Saving an excel sheet as xml adds quotes around some lines

I have a worksheet containing an xml script that is about 15 columns per 70,000 rows. I am trying to save this data in a file .xml. Current code I'm using:

Sub saveXML()
    Dim GenerateSheet As Worksheet
    Set GenerateSheet = ThisWorkbook.Sheets("TestCase-")
    GenerateSheet.SaveAs Filename:="C:\Users\" & "TestCase-" + Format(Now(), "YYYYMMDD") & ".xml", FileFormat:=xlTextWindows
End Sub

This saves it as an .xml file, but it seems to add quotes around random strings in a file that splits the XML file.

"<con:testCase xmlns:con=""http://eviware.com/soapui/config"" failOnError=""true"" failTestCaseOnErrors=""false"" keepSession=""false"" maxResults=""0"" name=""name"" searchProperties=""true"">"                                                                              
<con:settings/>                                                                             
"<con:testStep type=""request""  name=""TestStep_0001"">"                                                                               
<con:settings/>                                                                             
"<con:config xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:type=""con:RequestStep"">"                                                                             
<con:interface>QuoteService</con:interface>                                                                             
<con:operation>NewRate</con:operation>                                                                              
"<con:request name=""NewRate - Request 1"" outgoingWss="""" incomingWss="""" timeout="""" sslKeystore="""" useWsAddressing=""true"" useWsReliableMessaging=""false"" wssPasswordType="""">"                                                                             
<con:settings>  

There are no quotes on the sheet around any of the lines.

How can I control or prevent this behavior?

+4
source share
2 answers

, , . ( ). / , .

( "/" )

<con:request name="NewRate - Request 1" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="true" useWsReliableMessaging="false" wssPasswordType=""/>
0

, , ("), .

, - XML, :

ActiveWorkbook.XmlMaps.Add("[path to your file]", "[rootname]").Name = "[name of map]"

XML , .

0

Source: https://habr.com/ru/post/1653300/


All Articles