Using Excel coded automation APIs
To use the Excel coded automation APIs, apply the following steps:
- Download the activity package.
- Create a Coded Workflow.
- Call the
excel.UseExcelFilemethod to retrieve the handle of an Excel file.
note
By default, the excel.UseExcelFile method uses the Excel options from Project settings for the resulting handle. However, you can change the behavior by overriding the default options through the excel.ExcelProcessScope method.
- Use the handle to perform actions. With the Excel coded automation, you should be able to perform the same operations as with the Excel modern activities in a
.xamlfile.
note
You can use the IExcelProcess handle that is returned with UseExcelFile to better control the Excel application. For example, you can control how Excel is opened or closed on exit.
- For Workbook activities, use the
excel.UseWorkBookmethod to retrieve the handle of an Excel file. The available activities are also implemented as extension methods on theExcelOperationsclass.
note
The Excel activities are implemented in the Coded service as extension methods for handles. To check all the available extension methods, type ExcelOperations. and then Ctrl + Space.