all groups > dotnet xml > january 2006 >
You're in the

dotnet xml

group:

"Correct design?" Transform excel file to xml


"Correct design?" Transform excel file to xml andy
1/12/2006 1:31:40 AM
dotnet xml:
Hi

I am writing a procedure to load an excel file into an xml file that
can be validated before loading it into a database via an api.

At the moment I can read the excel file into a dataset very easily and
save the xml using writexml but of course i get a format that doesnt
match the schema.

So i would like to write the xml file using a schema document thats
already been provided.

Im new to xslt and im guessing thats what i need to do, but im unsure
of how to write xml using an existing schmema document.

Can anyone help with some articles or feedback ?
I can see plenty of articles on how to transform xml into excel but
none the other way around....

Thanks for help
Re: "Correct design?" Transform excel file to xml Pascal Schmitt
1/13/2006 6:22:05 PM
Hello!

[quoted text, click to view]

The easiest way: use Visual Studio to create a Schema from your original
output you want to transform.
Use a Schema Mapper software like Altova MapForce (there's a trial
version, very mighty but pricy) or Stylus Studio (don't know it).

<http://www.altova.com/products_mapforce.html>

The software will show you the XSDs you want to map and you can assign
wich elements should be transformed from one schema to the other by
drawing lines - the XSLT will be auto-generated (be sure to select XSLT
1.0, .NET does not support XSLT 2.0 [finally a good reason to hate
microsoft])


--
AddThis Social Bookmark Button