# XSLT-Template for Excel



## XL-Dennis (Aug 23, 2004)

Nice forum!

At present I'm working with VB.NET 2003 / SQL Server 2000 / ADO.NET/Excel 2003. 

Since it´s not possible to dump the records with CopyFromDataset in ADO.NET I try to make a workaround with XML/XSLT. (Write the records into a XML-file via a DataSet, transform it to a HTML-file with the XSLT-file)

At present my main concern is to create the XSLT-file for Excel 2003. 

Does anyone know a good source for XSLT-templates for Excel as I dislike very much to create all of it  (It reminds me of the old days when we wrote all HTML by hand...)?


----------



## XL-Dennis (Aug 24, 2004)

I found it here:

http://msdn.microsoft.com/xml/build...c_xl2003_ta/html/odc_xltransferxmltoxlwvb.asp


----------



## starl (Aug 24, 2004)

Sorry we couldn't help you Dennis - but thanks for posting what you found. I'm sure it'll help someone in the future... that is if anyone can figure out what you're doing


----------



## XL-Dennis (Aug 24, 2004)

An improved version of this little thing here:

http://www.excelkb.com/article.aspx?id=10094

Yes, I'm trying to learn about XML/XSLT


----------



## TommyGun (Aug 24, 2004)

XL-Dennis said:
			
		

> An improved version of this little thing here:
> 
> http://www.excelkb.com/article.aspx?id=10094
> 
> Yes, I'm trying to learn about XML/XSLT


Be careful Dennis...once you open that door, you might be changing your tag to *XML-Dennis*!    

XML/XSLT is great for what it is designed to do.  XML can take data and organize it into a way where it is logical, and can be processed with very little knowledge (given a good DTD or schema).

XSLT can take your XML and put it into a format that users like to see, or totally change your XML structure.

It is fun stuff!

If you haven't already, I highly recommend the books that O'Reilly has published on these two topics, and also their great XML site...O'Reilly XML.com.


----------



## XL-Dennis (Aug 24, 2004)

Hi Tommy,

Thanks for the heads up on O'Reilly and the warning 

My only aim is to get things working with importing data to Excel in ADO.NET in a smooth way. 

I expect we in Office 2005 can use ADO.NET and that we also get the method GetFromDataset available.

The most remarkable thing is not XML itself (as i only generate XML by code) it's the fact that the XSLT-file must be "well formed" otherwise it will not be executed.

So far I've been only evaluating Stylus Studios which give some possibilites to evaluate the XSLT-instructions.

BTW, I recently downloaded the Office 2003 Schemas but I have not had the time to dig into it deeper:

http://www.microsoft.com/downloads/...52-3547-420a-a412-00a2662442d9&displaylang=en

No, I´m a VB.NET / ADO.NET - man so unless I aband it for InfoPath I sure will only be touching it on its surface 

Take care,


----------



## TommyGun (Aug 24, 2004)

Well...if you look at a lot of your VB.NET/ADO.NET config files, they are stored in XML.  As a matter of fact, Windows XP does a lot with XML so it's a very good thing to know.

As far as I know, XML is the new version of the old INI files for applications.


----------



## XL-Dennis (Aug 24, 2004)

> As far as I know, XML is the new version of the old INI files for applications.



You seems to got a point with it but I'm sure MS wouldn't put it in terms like this 

FYI, I prefer to use Windows 2000 SP-4 then Windows XP Pro with SP-2 and I also ordered the book Learning XML  from O'Reilly.


----------



## TommyGun (Aug 24, 2004)

That's a great book.  I've just recently finished it.  Have fun!


----------



## XL-Dennis (Sep 13, 2004)

For those of You who are interested in this area following article at MSDN is worth reading:

http://msdn.microsoft.com/xml/default.aspx?pull=/library/en-us/odc_xl2003_ta/html/odc_xlxmlom.asp


----------

