Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
// Instantiate the Application object.
Excel.Application excelApp = Application;
// Specify the template Excel file path.
string myPath = "Get Text of Specific Cell.xlsx";
// Open the Excel file.
Microsoft.Office.Interop.Excel.Workbook ThisWorkbook = excelApp.Workbooks.Open(myPath, Missing.Value, Missing.Value,
Missing.Value, Missing.Value,
Missing.Value, Missing.Value,
Missing.Value, Missing.Value,
Missing.Value, Missing.Value,
Missing.Value, Missing.Value,
Missing.Value, Missing.Value);
String res = "";
res = ThisWorkbook.Worksheets["Sheet1"].Range("A1").Text;
MessageBox.Show(res);
// Save the file.
excelApp.ActiveWorkbook.Save();
excelApp.Quit();
// Specify the Excel file path.
string myPath = "Get Text of Specific Cell.xlsx";
// Instantiating a Workbook object
Workbook workbook = new Workbook(myPath);
// Get worksheet.
Worksheet worksheet = workbook.Worksheets[0];
String res = "";
res = worksheet.Cells["A1"].Value.ToString();
Console.Write(res);
Console.ReadKey();
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.