hy when i run this command to open excel and i get error (on 2007 excel it was fine)
//Excel.ApplicationClass xlApp;
Excel.Application xlApp;
Excel.Workbook xlWorkBook;
Excel.Worksheet xlWorkSheet;
object misValue = System.Reflection.Missing.Value;
SaveFileDialog oDialog = new SaveFileDialog();
xlApp = new Excel.ApplicationClass();
** xlWorkBook = xlApp.Workbooks.Add(misValue);**
xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
int i = 0;
int j = 0;
int z = 1;
//button1.Visible = true;
this.Cursor = Cursors.WaitCursor;
///////////////////////////////////////////////////////////////////////
foreach (DataGridViewColumn c in dvRMS.Columns)
{
c.SortMode = DataGridViewColumnSortMode.NotSortable;
c.Selected = false;
}
dvRMS.SelectionMode = DataGridViewSelectionMode.FullColumnSelect;
this is the error line::::
xlWorkBook = xlApp.Workbooks.Add(misValue);