mohammed  jaseefar

mohammed jaseefar

  • NA
  • 217
  • 20.2k

how export Array of a complex class to Excel using Interop

May 17 2018 5:27 AM
  1. private void btnDoctor_Click(object sender, EventArgs e)  
  2. {  
  3. Clear();  
  4. EmployeeWebservice.EmployeeData [] hm;  
  5. hm = hc.GetAllDoctors(lg);  
  6. dataGridView1.DataSource = hm;  
  7. SSiNETProjectLibrary.Utils.DataGridViewExport.exportToExcel(dataGridView1);  
  8. MessageBox.Show("Doctors Details Exported""", MessageBoxButtons.OK, MessageBoxIcon.Information);  
  9. lblmsg.Text = "";  
  10. }  
The above one iam tried, it is working.. but i can not customize because of the use of a external dll.
 
anybody can give the source using interop?

Answers (1)