Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, June 12, 2009 3:26 AM
Hi,
I am creating one .csv file, i have written successfully, but heading should be bold, for writing i am using this code
private void btnStreamWriter_Click(object sender, EventArgs e)
{
StreamWriter oStreamWriter;
string strFileName = "D:\Info.csv";
FileInfo oFileInfo = new FileInfo(strFileName);
oStreamWriter = new StreamWriter(strFileName, true);
if (oFileInfo.Length == 0)
{
oStreamWriter.Write("FileName");
oStreamWriter.Write(",");
oStreamWriter.Write("Status");
oStreamWriter.Write(",");
oStreamWriter.Write("Remarks");
oStreamWriter.Write(oStreamWriter.NewLine);
}
oStreamWriter.Write("Hello");
oStreamWriter.Write(",");
oStreamWriter.Write("Welcome");
oStreamWriter.Write(oStreamWriter.NewLine);
oStreamWriter.Close();
}
But after that i dont know how to bold heading. please help me.
All replies (2)
Friday, June 12, 2009 5:07 AM ✅Answered
Something that's not possile
CSV is a text file it does not have any formatting it has simple text
if you need formatting export to excel or Word
Friday, June 12, 2009 8:01 AM ✅Answered
What I know is it you can not put a bold statement in .csv file as per the specification.
Try whether u can do that manually uasing excel fiest which lets u to create a csv file.
Soumen, India