• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Updating XML file in SharePoint Location using VBA

PP3321

Active Member
Is there any alternative way for following command to edit xml,
which is stored in a certain location?

Open FilePath For Output As #1

I have the code below, but sometimes I get 'path not found' error.
Usually it works without any problem.
I confirm that path is correct...

Code:
Dim XMLFileName As String
XMLFileName = "\\sharepoint.site.com\myfile.xml"

Open XMLFileName For Output As #1

Print #1, "<?xml version=" & """1.0""" & " encoding=" & """UTF-8""" & " standalone=" & """yes""" & "?>"

Print #1, "<data>"
Print #1, "<variable>"
Print #1, "<row>"
Print #1, "<column>" & Range("A1").Value & "</column>"
Print #1, "</row>"
Print #1, "</variable>"
Print #1, "</data>"
 
Try using IP instead of string.

Other than that, I usually update SharePoint related items via PowerShell on the server side. I find it faster and easier to maintain.
 
@Chihiro

Thank you for your advice. Sorry if you do not mind, could you please help me further...?

1.I did not understand what you mean by IP...can you please explain...?

2. I think I can do updating part using PowerShell.
But I struggle to convert Excel Table to XML using PowerShell...
If you have any good resources on this, could you please share...
 
Back
Top