Hi team,
I was wondering if anyone can assist me with grabbing some info from cells in an excel spreadsheet and adding it to an existing .xml file.
Some points:
I have attempted to open the .xml file and add to the table, but unfortunately, the program creates the .xml file only creates a schema based on the info currently in the job. Therefore column headings are in different locations and may be missing depending many different variables. So this seems messy and I would like to avoid this method.
After inspecting many diffent .xml files, the only common reference I can see is that the info I wish to add must be inserted into the file before a known line of text. Here is a jpg showing the insertion point for my data. https://www.dropbox.com/s/cybntd6xe6csmyz/XML%20insert.jpg
In the JPG, the data in magenta is an example of the info I wish to add to the existing .xml file (The existing .xml file actually has the extension of .pad).
I’m sure I can handle formatting my excel data to be arranged / foramtted to match the .xml file, but I simply have no understanding of how to paste it into the fileimediately before the text line nominated in red in my jpg.
I will eventually like to have a macro run on my excel spreadsheet that opens the correct .pad file (will be the same name as my excel file), creates each line of text / code based on data in certain cells of my spreadsheet, copies and then pastes that data into the .pad file imediately before the known constant line, then saves the .pad file.
Can anyone offer assistance on how to insert the info into the .pad via VBA code?
The line in red is the constant line in the .pad file that my data must be added directly before.