How to change indentation for exporting Excel XML data?

I am using Excel Data XML Data Source and exporting data using menu option Data → XML → Export. The data is exported fine, but the resulting elements are indented using tabs. This may sound trivial, but is there a way to set the indentation formatting to spaces?

+1


a source to share


2 answers


I don't believe there is anyway to change the indentation character (or formatting the XML record) of the Excel XmlMap export logic. If you can, consider writing a simple macro to export directly to a string variable using the ExportXml method of the XmlMap object, and then perform a simple vbTab replacement with Space (2) or whatever on the resulting string before how to write it to a file.



Good luck!

+2


a source


If all else fails, you can always run it through Tidy afterwards.



+1


a source







All Articles