Full server documentation into an .xls?? Using this sp...

  • Full server documentation sp script found at:

    http://www.sqlservercentral.com/scripts/contributions/769.asp

    Question is... How to get this into .xls??

    Either one full .xls sheet, or multiple sheets would be great!

    Been trying to mess with this sp for a while, and get the results

    into an .xls, and finally I realize I need some help.

    Thoughts??

    _________________________

  • it's ridiculously easy....use the exact same script, but rename the output to .xls when you save it.

    excel will automatically translate HTML to the proper format when it opens the file.

    [post posting edit]

    i thought the script you quoted wa different than the one i use, which was also a contribution from SSC.

    I'm pasting a slightly enhanced version below...it outputs html formatted information in quewry analyzer, which you can then paste to a file and save...saving it as html or xls works great:

    [massive snip]

    download the updated version in the link below; some errors occur in the pasting due to forum defaults.

     

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • if only it were that easy.

    when opened in excel, the format is messed up, and

    took way to long to mod the xls, so thought it could

    be done better on the sp side upon execution.

    by the way... once ran through QA, seems there is

    a couple bugs in the script you posted.

    _________________________

  • What are you kidding?  This is a great lightweight, cost effective solution to documenting your databases and I plan to use it as a template for my server security reports.  Surely your not doing calculations with your server documentation?  So why would you limit yourself to excel?  

    Thank you Lowell !!!! for posting the html code builder.  It's a generous share and should be encouraged.  Code like what he has posted has helped me provide for my company what most people buy and pay buttloads to 3rd party app distributors. 

     


    LAURA OST

  • i'm not saying it's no good; just that i encountered some bugs with it.

    can you post your workable version?? that would be great!

    thanks!

    _________________________

  • the bugs are from the forum converting things like semicolon + close parenthesis into a winking smily face.

    the code worked perfect when i posted it; it just got a but munged from forum interpretation.

    i've placed a .txt file on my web site for you to download the uncorrupted version:

    http://www.stormrage.com/db_documentation_in_html_script_enhanced.sql

    there was a bug when getting dependancies on stored procedures; I corrected it by changing the cursor to TOP 1

    HTH

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Nice!! Very Nice!  Thanks!

  • Very nice..great work..I love the way it shows up..Thank you

  • very nice!  thanks!

    If I may make a couple of suggestions...

    1) add some comments...

    -- Execute in SQL Query Analyzer

    -- Be sure to "use <dbname>" before running

    -- Save As <filename>.html

    -- Written by Lowell "in Theory"

    -- Posted on SQL Server Central 10/2006

    2) post in script library here on SS Central

    Good work!  I will use this (smiley intentional)

    Thank-you,
    David Russell
    Any Cloud, Any Database, Oracle since 1982

  • Now if Lowell could post an html generator that would be sooooo cool!  I'm off to try to write one.  Thanks for the great ideas!


    LAURA OST

  • thanks everyone for the feedback; some folks were kind enough to give me feedback on specific issues they encountered, so I'll tweak the logic to make it even better; my typical databases that i tested against are kind of vanilla, and don't test every situation, so it's an ongoing process;

    Laura, if you could explain what you think of as an html generator, I'd like to hear it; I'm always looking for something to make me think a little harder, instead of wasting time watching American Idol

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Is American Idol on again?  Geez!  I MUST get a life... didn't know it was on <sniff>

    <sigh>

    Thank-you,
    David Russell
    Any Cloud, Any Database, Oracle since 1982

  • updated!

    Thanks again for all the feedback.

    Thanks to David Russell for pointing me towards the fix for some subqueries returing more than one row;that bug is fixed.

    other things i did:

    added functions to the list...somehow i did procedures, but no functions.

    if tables/procs/views/functions don't exist, a table prints that basically says "No Views exist in [dbname]" to see that, run against any msdb database, and you'll see examples of no views or functions.

    redownload when you get a chance, and report any other issues

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thank you Lowell!  This is wonderful!  Nice work!

  • Hi, everybody

    Can you help me get this script?

    If I only want to extract the table stuctures with the descriptions added to document each field. What should I have to do?

    Thanks

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic. Login to reply