I created two projects. One project is a windows form, and the other project is an Excel workbook project. I then added the Excel workbook project to the windows form project.
The window form is a welcome page. That page has some buttons that are supposed to open the workbook on a specific worksheet. For example, the screenshot below has a button Summary Worksheet, when the user clicks that button, I want to open the Excel project, on a spreadsheet by that name.
If my welcome page form was part of my Excel workbook project or any other workbook stored on my hard drive, I would know how to open the workbook. But because they are separate projects combined into one, I have no idea how I can access my workbook from the form. I guess I would like to add a reference to the winform for Excel.
I also attached a screenshot of my VS 2012 project window.
Welcome Page
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…