October 1, 2010 at 7:37 am
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.:-)
October 1, 2010 at 8:54 am
This was removed by the editor as SPAM
October 1, 2010 at 9:00 am
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
October 1, 2010 at 9:13 am
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.
October 1, 2010 at 9:21 am
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
October 1, 2010 at 9:41 am
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
October 1, 2010 at 9:52 am
Hey Thanks All, I got you now.:-)
October 1, 2010 at 9:52 am
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.
October 1, 2010 at 10:03 am
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.
October 1, 2010 at 10:22 am
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
October 1, 2010 at 1:25 pm
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.
October 1, 2010 at 1:29 pm
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
October 1, 2010 at 1:33 pm
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