Use this Query to Retrieve database table names, column names
SELECT table_name=sysobjects.name,
column_name=syscolumns.name,
datatype=systypes.name,
length=syscolumns.length
FROM sysobjects
JOIN syscolumns ON sysobjects.id = syscolumns.id
JOIN systypes ON syscolumns.xtype=systypes.xtype
WHERE sysobjects.xtype='U'
ORDER BY sysobjects.name,syscolumns.colid
to export dataset to excel see
Export Database to Excel, PDF, HTML, RTF, XML, etc. for ASP.NET without Automation[
^]