{
Stream attachment = null;
string excelContent = "";
excelContent += "
"; excelContent += dataset.Tables[0].Columns[index].ColumnName; excelContent += " | <>";
}
excelContent += ">
"; excelContent += dataset.Tables[0].Rows[rowNo][colNo].ToString(); excelContent += " | <>";
}
excelContent += ">
"; excelContent += dataset.Tables[0].Columns[index].ColumnName; excelContent += " | <>";
}
excelContent += ">
attachment = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(excelContent));
return attachment;
}
for further information visit
http://www.scribd.com/groups/discussion/40777-how-to-convert-a-datset-to-excel-content-using-c-net