Vba xml in Excel

XML stands for eXtensible Markup Language.

A Markup language is a language used to format information or data.

HTML is one such example of markup language that is used to format data to be displayed in web browser.

XML differs from HTML in many ways and has extensive use in terms of programming, which are as discussed below:

XML is more than just a markup language.

It is used to format data that both human readable and machine readable.

XML was designed to transport data or sharing of information across applications.

The XML can also store data like a database or excel and be transported as it is.

The XML data can be converted to any form such as Excel table, access table, SQL table, text file and so on.

The XML allows for custom definition of Tag names that adds beauty to the language, instead of some predefined tags in HTML.

This custom tags gives meaning to the data and acts as metadata, that means "data about data".

The following XML code will detail the above discussion:

  1. <?xml�version="1.0"�encoding="UTF-8"?>
  2. <Agencies>
  3. <Contractor>
  4. ����<name>Bhandhan Servicing</name>
  5. ����<service_type>Marriage arrangement</service_type>
  6. ����<description>
  7. All Services related to marriages
  8. ���</description>
  9. </Contractor>
  10. <Contractor>
  11. ����<name>VS functions</name>
  12. ����<service_type>Party arrangements</service_type>
  13. ����<description>
  14. Official get together, birthday party arrangements.
  15. ����</description>
  16. </Contractor>
  17. <Contractor>
  18. ����<name>Swami services</name>
  19. ����<service_type>Spiritual Services</service_type>
  20. ����<description>
  21. ��� Ganapathi homam, New home poojas performed.
  22. ����</description>
  23. </Contractor>
  24. <Contractor>
  25. ����<name>B Plus Services</name>
  26. ����<service_type>Blood Donation</service_type>
  27. ����<description>
  28. ��� Conducts Blood donation camps, organizing emergency blood donation
  29. ����</description>
  30. ����<calories>600</calories>
  31. </Contractor>
  32. </Agencies>

As seen above, Every XML file starts with <?xml> tag.

The version indicates the version of the XML document.

The Encoding specifies the encoding format of the data such as UTF-8,ASCII and so on.

From the above doc, it is clear from the first sight of the document itself that, the doc represents the breakfast menu of various food items.

Each tag represents or gives meaning to the information enclosed within.


You can find similar Excel Questions and Answer hereunder

1) Here some explanations about the XML DOM node in VBA, DOM stands for Document Object Model

2) How to debug a macro in Excel VBA

3) What is the xml group in the developer tab in Excel

4) How can I change the Marker size and Marker line color for all the series in a chart?

5) I have to make an investment decision - I have the cashflow numbers. In Excel, how do I calculate Internal Rate of Return (IRR)?

6) Given a raw data Table, how can I find the value of a field for a specific value of another field?

7) Is there a way to get a log value of a number using Excel?

8) How to modify strings in VBA, what are the functions you can manipulate strings with

9) What is activeX data object in Excel. How to use it? Here the basic explanations

10) Want to use SQL to manipulate a database. Here some basic explanation to get you started.


Here the previous and next chapter