Bold the Headers in CSV

  • How can we bold the headers when we are transforming the data to Csv.

    Please give me Ideas.

    Thanks Everyone in Advance for the help.:-)

  • This was removed by the editor as SPAM

  • Agreed, CSVs have no inherent formatting.

    But if you are going to display data in a web browser, or anything that recognizes HTML, you just wrap it in <b>bold</b> tags.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • hey, CSV is more like a excel but not like text. So I am assuming there should be way we should be able to do it. May be using script task or so.

    Please Advice.

  • preensheen (10/1/2010)


    hey, CSV is more like a excel but not like text. So I am assuming there should be way we should be able to do it. May be using script task or so.

    Please Advice.

    no, you are confusing attributes of an application, and expecting them to exist in the attributes of a text file.

    Like the other posters stated, the csv file is raw text.

    Once opened in an application(Word,Excel,etc) you can change a copy of that file to contain the excel attributes you are expecting, but when you save, you get the warning "attributes would be lost, do you want to save as Excel instead"

    if you want bold, you've gotta save as a different format...excel, html, or something else.

    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!

  • Display attributes are properly handled on the client side. If Excel is the target application, I would suggest creating an Excel macro to handle it.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • Hey Thanks All, I got you now.:-)

  • No you can't even build an excel macro into a csv file. yes, excel prettily renders csv to look like an excel spreadsheet, but if you drop that csv file into notepad you will see exactly what constitutes that csv. nothing more than fields and commas. no way to insert formatting into it.

  • The Dixie Flatline (10/1/2010)


    Display attributes are properly handled on the client side. If Excel is the target application, I would suggest creating an Excel macro to handle it.

    Hey my target is CSV.

  • CSV is a file format, not an application.

    I am suggesting you write an excel macro to open the file and then Bold everything you want highlighted. At this point it really isn't a T-SQL question, but you might find some articles in here about SSIS that discuss populating spreadsheets directly from the database.

    If the question is: "Is there a generic BOLD attribute that can be applied to a CSV?" then the answer is "No".

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • The Dixie Flatline (10/1/2010)


    CSV is a file format, not an application.

    I am suggesting you write an excel macro to open the file and then Bold everything you want highlighted. At this point it really isn't a T-SQL question, but you might find some articles in here about SSIS that discuss populating spreadsheets directly from the database.

    If the question is: "Is there a generic BOLD attribute that can be applied to a CSV?" then the answer is "No".

    Ok then you mean to say that, If CSV is the file format which I have to send to the destination, then we can't bold the attributes in that.

  • That's correct. If you need to pass along formatting attributes, you might consider XML as an alternative to CSV.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • Again, Thanks all for the help provided.

Viewing 13 posts - 1 through 12 (of 12 total)

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