Excel to XML

Here, I am gonna show how to convert the excel document into XML format. It's simply easy. 

Required Tools: 

  • Notepad 
  • Excel 


Step 1: Create a schema based XML source. It defines the structure of the XML file. Code : Copy and paste this code and change as per your needs.

d11 

Step 2: Save the Notepad with the name of Schema.xml, it can be any name but the extension should be .xml

Step 3: Open Excel sheet and make sure the developer tab is enabled and visible in the top tabs like below. If the developer tab is not available, then click on file tab and go to options and go to Customize Ribbon then filter “All Tabs”. Finally, choose Developer Tab and add it.

d1 

Step 4: Open the Excel which you want to convert into xml Note: XML schema should be matched with the columns specified here. Step 5: Click on the Source in the developer Tab

d2 

Step 6: Choose XML Maps and add the Schema file and give ok.

d3 d4 


Step 7: Map the columns by dragging the XML record name to excel columns

d5 

Step 8 : Export the file as XML

d6

Comments

Popular posts from this blog

SQL Server–Alter failed for Server

Generate Data Time Dimension Table in SAP HANA

Access HANA view in SQL Console