Hi Friends,
I am using C# language,I am getting my data in Excel sheet for reporting purpose from database but i want to know how to put the company name or any other header into sheet.
Do you have any idea...Plz help.
thanks.
Format:
Headername
Comapany name
Fieldname1
Fieldname2
Fieldname3
Value1
Value2
Value3
Here
Fieldname and Value are coming from database.I want to put
Code:
public
{
filename = path +
// first let's clean up the response.object
response.Clear();
response.Charset =
response.ContentType =
System.Web.UI.WebControls.
dg.DataSource = ds;
dg.DataBind();
dg.RenderControl(htw);
response.Write(sw.ToString());
streamWriter.Write(sw.ToString());
streamWriter.Close();
}
I am calling this code into my main function