VBA Code for XSD using excel data

Jahnavi

New Member
Joined
Mar 8, 2019
Messages
1
Dears,

kindly help in writing VBA code to produce XSD for the below requirement. I have two columns one is having data element name and another column is defined hierarchy. Both columns are availble as excel data.

[TABLE="width: 580"]
<tbody>[TR]
[TD]Schema DE Name[/TD]
[TD]Hierarchy[/TD]
[/TR]
[TR]
[TD]NSM-VEHICLEPASSINFORMATION[/TD]
[TD]NSM-VEHICLEPASSINFORMATION[/TD]
[/TR]
[TR]
[TD]gatePassNumber[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]gatePassGenerationDateTime[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]gatePassStatus[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]tripType[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]totalTrips[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]entryCustomsStationCode[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]exitCustomsStationCode[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]transporterName[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]transporterCode[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]vehiclePlateNumber[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]driverName[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]driverIC[/TD]
[TD]ELEMENT(VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]GATEPASSDETAILS[/TD]
[TD]CHILD(NSM-VEHICLEPASSINFORMATION)[/TD]
[/TR]
[TR]
[TD]GATEPASSDETAIL[/TD]
[TD]CHILD(GATEPASSDETAILS)[/TD]
[/TR]
[TR]
[TD]tripNumber[/TD]
[TD]ELEMENT(GATEPASSDETAIL)[/TD]
[/TR]
[TR]
[TD]tripStatus[/TD]
[TD]ELEMENT(GATEPASSDETAIL)[/TD]
[/TR]
[TR]
[TD]ENTRY[/TD]
[TD]CHILD(GATEPASSDETAIL)[/TD]
[/TR]
[TR]
[TD]containerNumber[/TD]
[TD]ELEMENT(ENTRY)[/TD]
[/TR]
[TR]
[TD]expectedEntryDateTime[/TD]
[TD]ELEMENT(ENTRY)[/TD]
[/TR]
[TR]
[TD]DECLARATIONS[/TD]
[TD]CHILD(ENTRY)[/TD]
[/TR]
[TR]
[TD]DECLARATION[/TD]
[TD]CHILD(DECLARATIONS)[/TD]
[/TR]
[TR]
[TD]declarationNumber[/TD]
[TD]ELEMENT(DECLARATION)[/TD]
[/TR]
[TR]
[TD]BLAWBNumber[/TD]
[TD]ELEMENT(DECLARATION)[/TD]
[/TR]
[TR]
[TD]ITEMS[/TD]
[TD]CHILD(DECLARATION)[/TD]
[/TR]
[TR]
[TD]ITEM[/TD]
[TD]CHILD(ITEMS)[/TD]
[/TR]
[TR]
[TD]HSCode[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]quantity[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]quantityUOM[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]CONTAINERS[/TD]
[TD]CHILD(DECLARATION)[/TD]
[/TR]
[TR]
[TD]CONTAINER[/TD]
[TD]CHILD(CONTAINERS)[/TD]
[/TR]
[TR]
[TD]containerNumber[/TD]
[TD]ELEMENT(CONTAINER)[/TD]
[/TR]
[TR]
[TD]EXIT[/TD]
[TD]CHILD(GATEPASSDETAIL)[/TD]
[/TR]
[TR]
[TD]containerNumber[/TD]
[TD]ELEMENT(EXIT)[/TD]
[/TR]
[TR]
[TD]expectedExitDateTime[/TD]
[TD]ELEMENT(EXIT)[/TD]
[/TR]
[TR]
[TD]DECLARATIONS[/TD]
[TD]CHILD(EXIT)[/TD]
[/TR]
[TR]
[TD]DECLARATION[/TD]
[TD]CHILD(DECLARATIONS)[/TD]
[/TR]
[TR]
[TD]declarationNumber[/TD]
[TD]ELEMENT(DECLARATION)[/TD]
[/TR]
[TR]
[TD]BLAWBNumber[/TD]
[TD]ELEMENT(DECLARATION)[/TD]
[/TR]
[TR]
[TD]ITEMS[/TD]
[TD]CHILD(DECLARATION)[/TD]
[/TR]
[TR]
[TD]ITEM[/TD]
[TD]CHILD(ITEMS)[/TD]
[/TR]
[TR]
[TD]HSCode[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]quantity[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]quantityUOM[/TD]
[TD]ELEMENT(ITEM)[/TD]
[/TR]
[TR]
[TD]CONTAINERS[/TD]
[TD]CHILD(DECLARATION)[/TD]
[/TR]
[TR]
[TD]CONTAINER[/TD]
[TD]CHILD(CONTAINERS)[/TD]
[/TR]
[TR]
[TD]containerNumber[/TD]
[TD]ELEMENT(CONTAINER)[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top