Hi all ,
I am using Stram writer to create a excel sheet. i am creating a excel file and attaching that to mail attchment in crm2011.
All my code is working fine..
what my question is while creating only i wnat to make headers as a bold.
Below is my code. Please let me know any idea to do this.
using (MemoryStream memory = new MemoryStream())
{
using (StreamWriter streamwriter = new StreamWriter(memory))
{
string str = string.Empty;
str = "Displayname,LogicalName,OldValue,ModifiedValue";//these are the header names
foreach (var att in attributes)
{
string ModifiedValue = ""; string displayname = ""; string LogicalName = ""; string OldValue = "";
streamwriter.WriteLine(displayname + "," + LogicalName + "," + OldValue + "," + ModifiedValue);
}
}
streamwriter.Flush();
streamwriter.Dispose();
SendEmailWithAttachment(service, memory, PrimaryEntity);
}
In the attachment i m using like this
mailattach[HelperClass.EMAILATTACHMENT.MIMETYPE] = "application/octet-stream";
mailattach[HelperClass.EMAILATTACHMENT.FILENAME] = "Modfied Fields for " + Entityname + ".csv";
====
All are working fine ... but i am not getting how to make headers as in bold.