I'm using the Excel Interop to input a number of strings into cells. The cells can change depending on the excel "template" I open.
The cell names are constant however: the template file will always have a number of input cells with specific names.
What I need to do (In Visual C#, 2005) is get the specific cell in the worksheet from a name I specify in the code, and change it's value.
So far I have the following set up:From there I'm not sure where to go. Any help would be appreciated.Code:Excel.Application oXLApp = new Excel.Application(); oXLApp.Visible = true; Excel.Workbook oXLBook = oXLApp.Workbooks.Open( Application.StartupPath + "\\Template1.xls", openFileDialog1.FileName, 0, true, 5, "", "", true, Excel.XlPlatform.xlWindows, "\t", false, false, 0, true); Excel.Worksheet oSht = (Excel.Worksheet)oXLBook.Worksheets.get_Item(1);
Qu.




Reply With Quote