Excel 2013 VBA添加奇怪的引号
说吧
Sub test() Worksheets("1").Cells(1, 1).Value = "html" Worksheets("1").Cells(1, 2).Value = "<xml xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" > " txt = " '" & Worksheets("1").Cells(1, 1) & "'=>array('" & Worksheets("1").Cells(1, 2) & "' => $" & Worksheets("1").Cells(1, 1) & ")," MsgBox txt FilePath = Application.DefaultFilePath & "\array.txt" Open FilePath For Output As #2 Write #2, txt Close #2 End Sub
现在比较msgbox输出和array.txt文件。
所以我所有的txtstring都被引用,还向url添加了额外的引号,如何防止更改并获取string。
问题是如何把msgbox的输出放在array.txt中?
Sub test() Worksheets("1").Cells(1, 1).Value = "html" Worksheets("1").Cells(1, 2).Value = "<xml xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" > " txt = " '" & Worksheets("1").Cells(1, 1) & "'=>array('" & Worksheets("1").Cells(1, 2) & "' => $" & Worksheets("1").Cells(1, 1) & ")," MsgBox txt FilePath = Application.DefaultFilePath & "\array.txt" Open FilePath For Output As #2 Print #2, txt Close #2 End Sub