hi guys
I am generating .xls on buttonclick. I am getting proper data in .xls.
but i want that to write heading i.e " salary report of all employee" and " date " at top of .xls file. then my data should come.
how to do it .kindly suggest
here is my code:
Protected Function GetDatafromDatabase() As DataTable
Dim dt As New DataTable()
Dim strConnString As String = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
Using con As New SqlConnection(strConnString)
con.Open()
Dim cmd As New SqlCommand("SELECT salary , employee from emp", con)
Dim da As New SqlDataAdapter(cmd)
da.Fill(dt)
con.Close()
End Using
Return dt
End Function
Go to the complete details ...