Output to excel or xml

Documents SQL Server 2005 and 2008 databases.

Moderators: JonathanWatts, David Atkinson, Michelle Taylor

Output to excel or xml

Postby green squirrel » Thu Mar 01, 2012 6:49 pm

Hi there,
What I'd like is to only generate tables and columns, and put this info into excel. However, I see thats not possible (correct me if Im wrong?)
So I thought: ok, I'll create the html stuff, and read it as xml (in vba, for instance). The trouble is, I don't think the generated HTML is well formed - msxml2 parser doesnt like it.
So is it possible to output just pure xml?

OK thats it, thanks all.
destination anywhere
green squirrel
 
Posts: 2
Joined: Thu Mar 01, 2012 6:31 pm

Postby peter.peart » Thu Mar 01, 2012 9:53 pm

Thanks for your post. Unfortunately, it's not possible to output to pure XML.

Out of curiosity, why do you want the outputted documentation in Excel format?

Peter
Peter Peart
Red Gate Software Ltd
+44 (0)870 160 0037 ext. 8569
1 866 RED GATE ext. 8569
peter.peart
Site Admin
 
Posts: 362
Joined: Tue Sep 02, 2008 9:58 am
Location: Top floor, RG towers with the cool kids

Re:

Postby green squirrel » Fri Mar 02, 2012 4:01 pm

peter.peart wrote:Thanks for your post. Unfortunately, it's not possible to output to pure XML.

Out of curiosity, why do you want the outputted documentation in Excel format?

Peter


We need to document our system, and we do not use vizio, so excel is the only alternative.
Im trying to do a database dictionary of all the relevant fields in all the relevant tables. I want to design excel in such a way that all fields can have a hyperlink (or something else) which allows them to automatically see the database dictionary definition by hovering or clicking. I was thinking about automatically launching the html one, but unfortunanately you can only open the page, not focus (and autoscroll ) onto the field definition.

So I have to do this the hard way.

Im a little bemused that theres no xml output, though - I would have thought the xml would have existed, and HTML page would have been created by running a transformation stylesheet over the xml.

Ah well. I suppose i could always create the xml myself using ....
SELECT objtype, objname, name, value
FROM fn_listextendedproperty (NULL, 'schema', 'dbo', 'table', 'claimmoney', 'column', default)
for xml auto, elements

... or something like that. Quite simple actually!

You guys should think about having an xml output option - nothing wrong with having raw, unadulterated data!
It would be easy after that - excel 2007 can open xml with no difficulty.

Anyway, thanks v much for getting back to me.
destination anywhere
green squirrel
 
Posts: 2
Joined: Thu Mar 01, 2012 6:31 pm


Return to SQL Doc 2

Who is online

Users browsing this forum: No registered users and 1 guest