Show TOC

GWM Excel Add-In Project StructureLocate this document in the navigation structure

This section will guide you to understand the structure of the generated project.

Context

On completion of the steps in the wizard, a project containing the generated code for the Excel add-in template is created in the path C:\...\Visual Studio 2012\Projects\<Your Project Name>.
Note The path depends on the version of the Microsoft Visual Studio you have.

The content of the project is presented in the Solution Explorer pane with the following structure:

The following is a description of the image above, showing the generated project in the Solution Explorer pane:

  • Properties, References, and Excel

    Visual Studio automatically generates the classes found in these objects into your add-in project. They are listed at the top of the project tree.

    In addition, the following are generated:

    • GWPAMExcelAddIn40_TemporaryKey.pfx

    • GWPAMRibbon.cs

    • GWPAMRibbon.xml

    The Excel object contains the class, <ThisAddIn.cs >(in C#). This file is replaced when you generate the GWM Excel add-in. The class is automatically instantiated by Visual Studio Tools for Office runtime for you when the Microsoft Excel application loads your add-in.

    The rest of the folders marked in the red box contain classes that are generated by GWM Excel add-in for your project. The following are the folders:
  • BusinessEntity

    Contains the class, BusinessConnectivityHelper.cs, which handles connectivity to the OData endpoint. It performs the required handling to enable authentication to the SAP Gateway endpoint.

    Also, it triggers the call to the SAP Gateway endpoint with requestId and SAP Passport required for enterprise readiness.

    Note To use Basic authentication, provide your logon credentials in HandleSAPConnectivity method of BusinessConnectivityHelper.cs class.
  • Common
    By default, GWM Excel add-in generates the Common folder for each project in a solution. Find the following classes in this folder:
    • CommonExtensions.cs
    • ExceptionHandler.cs
    • ExcelUtilities.cs
    • Constants.cs
    • GWPAMCommands.cs
    • ResourceManager.cs
  • Excel
    By default, GWM Excel add-in generates the Excel folder for each project in a solution. The folder contains the ExcelManager folder. Find the following in the ExcelManager folder:
    • ExcelRibbon.Designer.cs
    • ExcelRibbon.cs
    • DataTableExtensions.cs
    • ExcelDataManager.cs
    • ExcelExtensions.cs
    • ExcelSettingManager.cs
    • ExcelUpdatedStatus.cs
  • Images

    By default, GWM Excel add-in generates the Images folder for each project in a solution. The folder contains the images used in the template.

  • Logger

    By default, GWM Excel add-in generates the Logger folder for each project in a solution. The folder contains the class, logger.cs, handles the logging and tracing capabilities for the template.

    The class provides APIs to log the necessary information to the Event Viewer or a local file. The class uses System.Trace API, and enabled through the file, App.config.This class can be extended to support any other custom logging (including third party logs).

  • SAP Service Reference
    By default, GWM Excel add-in generates the SAP Service Reference folder for each project in a solution. The folder contains the following:
    • App.config
    • EntitySetMetadata.cs
    • PropertyMetadata.cs
    • <Your Template Name>.adm
    • <Service Name>.cs
    • <Service Name>Extension.cs
    • <Service Name>SAPExtension.cs
  • UIResources
    By default, GWM Excel add-in generates the UIResources folder for each project in a solution. This folder contains the resources for adapting the UI components to the preferred culture and language settings. The folder contains the following:
    • ErrorMessages.resx
    • ResourceBuildScript.bat
    • RibbonRegion.resx
    • UIDialog.resx
  • UIScreens
    By default, GWM Excel add-in generates the UIScreens folder for each project in a solution. The folder contains the following subfolders:
    • Configurations

      The folder contains the settings definition. Extend this class to provide extra Excel settings as your application needs. It has the following classes:

      • ConfigurationForm.cs class that contains the ConfigurationForm.Designer.cs.
    • ProcessBar

      The folder contains the generated code for Submitting action. This class provides a process bar during async operations. It has the following:

      • SubmittingForm.cs class that contains the submittingForm.Designer.cs.

    • SubmitReport

      The folder contains the following subfolder, DataModel

      • The subfolder contains the class, SubmitChangesDataModel.cs. It informs of the status of actions performed.

      • View

        The subfolder contains ChangeSubmitWindow.xaml which contains ChangeSubmitWindow.xaml.cs. These classes are for accessibility purposes.

      • ViewModel

        The subfolder contains the class, SubmitChangesViewModel.cs. It has methods for handling submitted changes in the view model.