Referring to the Excel PIA
- In the Solution Explorer, refer to the Excel Primary Interop Assembly (PIA) by clicking the project file
- Click the "Add Reference" menu option
- In the Add Reference dialog, click in the .NET tab and find Microsoft.Office.Interop.Excel.14.0.0.0 and click Ok
Define an Alias for the Excel PIA Namespace
using Excel=Microsoft.Office.Interop.Excel;
Declare and instantiate an Excel application object
Excel.Application objExcel=new Excel.Application();
No comments:
Post a Comment