Microsoft.Office.Interop.Excel.Range myrange = excelsheet.get_Range(excelsheet.Cells[1, 1], excelsheet.Cells[this.dataGridView1.RowCount + 1, this.dataGridView1.Columns.Count]);
Solution:
Include (object) as shown in the below line....................
Microsoft.Office.Interop.Excel.Range myrange = excelsheet.get_Range((object)excelsheet.Cells[1, 1], (object)excelsheet.Cells[this.dataGridView1.RowCount + 1, this.dataGridView1.Columns.Count]);
Solution:
Include (object) as shown in the below line....................
Microsoft.Office.Interop.Excel.Range myrange = excelsheet.get_Range((object)excelsheet.Cells[1, 1], (object)excelsheet.Cells[this.dataGridView1.RowCount + 1, this.dataGridView1.Columns.Count]);
No comments:
Post a Comment