Obtain Value in sheet from C#

R

Robert

I am opening an Excel Workbook from C# (VS2005) and I need to get a value
from a Spreadsheet before closing the C# application. Does anyone know if
this can be done? Here is the code to open the Workbook:

//Open the Excel Spreadsheet
Microsoft.Office.Interop.Excel.Application excelApp = new
Microsoft.Office.Interop.Excel.ApplicationClass();
excelApp.Visible = true;
string workbookPath = @"\\path\file$\folder\AssignmentTest.xls";
Microsoft.Office.Interop.Excel.Workbook excelWorkbook =
excelApp.Workbooks.Open(workbookPath,
0, false, 5, "password", "", true,
Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "",
true, false, 0, true, false, false);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top