Group:  General ยป microsoft.public.office.xml
Thread: Generate XSD Schema through Excel

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Generate XSD Schema through Excel
"Harold Crump" <orientletter[ at ]yahoo.com> 07.07.2006 22:48:36
Greetings,

I have an XML document that I wish to import through Excel.

Every time I try to import it, Excel complains that there is no schema
defined (which is correct).

Is it possible to get Excel to generate an XSD schema automatically
that I can then attach to the XML document so that every time I import
the XML document, Excel picks up the schema and auto-generates column
headings for me?

I see that there is a Verify Map for Export buttons, but I can't find a
way to generate the XSD based on the XML.

Any ideas?

Thanks,
Harold
P.S. The only reason I want to have an XSD is because I want Excel to
show column headings when the XML data is imported. If there is only 1
record, Excel does not infer the schema.

Re: Generate XSD Schema through Excel
Cindy M -WordMVP- <C.Meister-C[ at ]hispeed.ch> 08.07.2006 16:40:01
Hi Harold,

You might want to follow up on this in an Excel group, but...

[Quoted Text]
> I have an XML document that I wish to import through Excel.
>
> Every time I try to import it, Excel complains that there is no schema
> defined (which is correct).
>
This message also tells you Excel will generate a schema, so go ahead and
OK it. A taskpane should open that shows the "XML Mapping". If you don't
like the way things look, delete all the XML content from the worksheet,
then drag the headings onto it the way you'd like to have things look.
This should create a "list"; click in the first cell of the empty list
row (below the first heading)

Now import the XML data again and let Excel populate it into the list,
starting with the selected cell (A2, usually). You can set properties so
that the workbook links to the XML file and will refresh the data from
the file when instructed to do so.

Then just save the workbook. When you open it, it should be connected to
the XML file, no need to import it every time.

> Is it possible to get Excel to generate an XSD schema automatically
> that I can then attach to the XML document so that every time I import
> the XML document, Excel picks up the schema and auto-generates column
> headings for me?
>
> I see that there is a Verify Map for Export buttons, but I can't find a
> way to generate the XSD based on the XML.
>

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net