cancel
Showing results for 
Search instead for 
Did you mean: 

regarding creation of data type from an excel sheet

Former Member
0 Kudos

hi experts,

I am to create a data type which has 2000 fields. details about data type is in excel sheet.

Is there any way i can convert this excel sheet to xsd and impot it in XI

or there is any other way to do it fast.

Or i will have create it manually one by one element.

thanks

Jaideep

Accepted Solutions (1)

Accepted Solutions (1)

former_member192295
Active Contributor
0 Kudos

Hi,

First convert file to xls to xml file (through SAVE AS) and open this xml file in XML SPY software. In SPY software Select option DTD/Schema in that select Generate XSD, through this option we can get XSD format file. Now you can upload this file into XI/PI through external definition.

(or) follow below steps.

1. In Excel save your file as CSV(You have this in save as options).

2. in XML Spy go to Convert Menu and select Import text file.

Convert->Import Text

3.Select 2 nd option (i.e Conver CSV to XML)

4. You will get the XML format, make sure your XML is valid.

5. Go to DTD/SCHEMA->Genarate DTD/Schema and follow the steps to genarate XSD.

Former Member
0 Kudos

Hi,

Once you get your xml, you can convert your xml into xml shema using folloing link.

http://www.hitsw.com/xml_utilites/

Regards

Reyaz

Former Member
0 Kudos

Thanks Nallam,

I almost got the result. But problem is that in my excel there some more fields like max, min occur deccription, data type, which are not coming in xsd..

can u put some light on that.

Thanks

Jaideep

0 Kudos

Hi,

By default the occurences in the DTD will be Only One Occurrence.

In the DTD you have to delclare the occurences as below and then convert to XSD using XML spy.

Declaring Only One Occurrence of an Element

Declaring Only One Occurrence of an Element

<!ELEMENT element-name (child-name)>Example:<!ELEMENT note (message)>

The example above declares that the child element "message" must occur once, and only once inside the "note" element.

-


Declaring Minimum One Occurrence of an Element (put + sign after the message)

<!ELEMENT element-name (child-name+)>Example:<!ELEMENT note (message+)>

The + sign in the example above declares that the child element "message" must occur one or more times inside the "note" element.

-


Declaring Zero or More Occurrences of an Element (put * sign after the message)

<!ELEMENT element-name (child-name)>Example:<!ELEMENT note (message)>

The * sign in the example above declares that the child element "message" can occur zero or more times inside the "note" element.

-


Declaring Zero or One Occurrences of an Element (put ? sign after the message)

<!ELEMENT element-name (child-name?)>Example:<!ELEMENT note (message?)>

The ? sign in the example above declares that the child element "message" can occur zero or one time inside the "note" element.

http://www.w3schools.com/DTD/dtd_elements.asp

Regards,

Krishnaraju

Edited by: v r krishnaraju mudunuri on Feb 20, 2009 1:24 AM

Edited by: v r krishnaraju mudunuri on Feb 20, 2009 1:25 AM

Answers (1)

Answers (1)

prateek
Active Contributor
0 Kudos

Freewares like XMLFox could help in converting excel into Xml format. Not sure about xsd.

Regards,

Prateek