You can use a Script to execute C# code. Better yet, in recent versions of 8.0 you can right-click on a Component and add a Type Extension to it. This will allow you to add methods to that component for all instances of it within the project. In Object Explorer, locate the component (in this case your Excel Connector) and right-click it. Select Create Type Extension and you will see a cs file that you can add your code to. Once you build the solution, you should see those methods, properties, or events on the connector.