private void ReadExcel()
Excel.Application xlApp = new Excel.Application();
Excel.Workbook xlWorkbook = xlApp.Workbooks.Open(openFileDialog1.FileName);
Excel._Worksheet xlWorksheet = xlWorkbook.Sheets;
Excel.Range xlRange = xlWorksheet.UsedRange;
MSDN wrote: If there are changes to the workbook and the workbook appears in other open windows, this argument is ignored. If there are changes to the workbook but the workbook does not appear in any other open windows, this argument specifies whether changes should be saved, as shown in the following list.
xlWorkbook.Close(false, Missing.Value, Missing.Value);
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)