Table2XML

Rwn

King
Joined
Mar 12, 2014
Messages
711
I was a bit surprised that such a tool did not seem to exist (at least, that you didn't use one), so, after a bit of brain drain, here it is: the Table2XML tool to convert Excel tables into xml files.


How does it work?
- Fill in the Data spreadsheet with the tag data from an xml file (I've put the one from BuildingInfos as an example). There are a few rules to follow, such as having each parent tag for each tag in a separate row, and when a parent tag covers several subtags, it should be on the same row. Still, it's rather intuitive (see the example building data)
- Select the entries you want to export
- Press the "Generate XML File" button in the spreadsheet
- An xml file is generated with all the tag data for the selected entries. Empty tags are ignored.

There are a few additional instructions in the file, but that's mostly it.


I had to use a VBA macro for this, so I'm afraid it won't work with LibreOffice or other softwares (sorry Dancing Hoskuld). Actually, I more or less learned VBA to do that (though I had some programming basics), so I'm sure my code is horrible, but, well, it seems to work...

I don't guarantee it's 100% bug-free, but my tests seem satisfactory. If you encounter a bug or have a suggestion for improvement, do not hesitate to post it here.


Now the hard part will be to actually get the various tables based on the xml, but still, this tool does half the work ;)


Input tab (you shouldn't need to change the values on the bottom unless you load a different table):
Spoiler :
9zjl3Zk.png


Data tab, with 8 entries selected for exportation:
Spoiler :
Oh5GMhk.png


XML output:
Spoiler :
pKlHVjy.png
 

Attachments

Interesting, will take a look.
 
Back
Top Bottom