JamesHanley
Programmer
I am trying to export an entire datagrid as a whole to excel. I have tried so many different things, but they dont seem to work. Below is my only button on my project and it takes recovered information and puts it on the data grid. How can i get this to work. just click and it makes a .xls file with all the data on it. no cell by cell stuff. too much work.
private void button1_Click(object sender, System.EventArgs e)
{
MessageBox.Show("Runing Report...This May Take Several Minutes.");
DataSet lstDataSet = new DataSet();
sla.HRDataSet(lstDataSet, cboApps.Text);
dataGrid1.DataSource = lstDataSet.Tables[0];
}
private void button1_Click(object sender, System.EventArgs e)
{
MessageBox.Show("Runing Report...This May Take Several Minutes.");
DataSet lstDataSet = new DataSet();
sla.HRDataSet(lstDataSet, cboApps.Text);
dataGrid1.DataSource = lstDataSet.Tables[0];
}