Reputation: 7
i want click on button in excel File with "Microsoft.Office.Interop.Excel". with following code just do select cell but Not clicked
Microsoft.Office.Interop.Excel.Application ExcelApp = (Microsoft.Office.Interop.Excel.Application)Marshal.GetActiveObject("Excel.Application");
Microsoft.Office.Interop.Excel.Workbook book = ExcelApp.ActiveWorkbook;
Microsoft.Office.Interop.Excel.Worksheet sheet = book.ActiveSheet;
Microsoft.Office.Interop.Excel.Range ExcelRange = sheet.get_Range("A4");
ExcelRange.Select();
How to click button?
Upvotes: 0
Views: 1680
Reputation: 31
Since I don't have enough reputation to comment yet, I will need to get clarification from you through the answer. Are you attempting to run a macro with the button click?
If so, the direction should be accessing the data itself or the macro itself.
For accessing Excel Data, you can refer to:
For accessing Excel Macro, you can refer to:
Upvotes: 1