I am trying to write a program that replaces a process in an excel spreadsheet. I have included a link label that is supposed to open the log sheet in excel, yet when I click excel does not open.
The code I have is this, except maybe people mean something different to "link to an excel worksheet" as I do.
I feel I am getting lost by my description of the issue.
I tried this code:
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Microsoft.Office.Interop.Excel.Application excel = new Microsoft.Office.Interop.Excel.Application();
Workbook wb = excel.Workbooks.Open("c:\Directory\filename.xml");
Microsoft.Office.Interop.Excel.Worksheet wx = excel.ActiveSheet as Microsoft.Office.Interop.Excel.Worksheet;
}
What I think is happening is that an Excel object is opened within the app containing the spreadsheet, but the user can't access it because I need to create an interface to the spreadsheet (through a second form or such) that way. But that was not what I was trying to do.
What I wanted was for the actual Excel installed on the PC to open up alongside my app and for that to open the spreadsheet and the user uses Excel (not my app) to enter the log.
This is a stepping stone to my eventual solution.