using Excel = Microsoft.Office.Interop.Excel; string ExcelFile = Application.StartupPath + @"\SurveyLinks.xlsx"; Excel.Application ExcelApp = new Excel.Application(); Excel.Workbook ExcelWorkBook = ExcelApp.Workbooks.Open(ExcelFile); Excel._Worksheet ExcelWorkSheet = ExcelWorkBook.Sheets[1]; Excel.Range ExcelRange = ExcelWorkSheet.
range = excelSheet.UsedRange;
Excel.Range firstRow = range.Rows[1];
foreach (Excel.Range cell in firstRow.Cells) { Console.WriteLine(cell.Value); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)