Description
This activity is used to write some data to an Excel file. It can be used for a wide variety of tasks when it is needed to save some structured data to a table, for example, when processing some business data.
Studio Pro supports Microsoft Excel .xls and .xlsx file formats.
As of the 8.3 update, there are two ways of interacting with MS Excel - Microsoft Native and Generic. Navigate to the menu "Settings" → "Microsoft activities" to choose a method.
Microsoft Native uses standard Microsoft methods to interact with the Excel application. It requires Excel to be installed on the machine and provides higher efficiency and stability with different types of files.
Generic does not require Excel to be installed, but it may be less efficient and stable.
Parameters
The first parameter here is Path which defines the Excel file you are going to modify. It is required.
Path parameter
The next one is Value. It defines what will be written to the Excel file. It is also required.
The Calculate a value option lets you form the value dynamically. Here is a usage example:
{
"My List": [
{
"Country": "Russia",
"Capital": "Moscow"
},
{
"Country": "USA",
"Capital": "Washington DC"
}
]
}
"My List" is the table sheet name, "Country" and "Capital" are columns, "Russia", "USA", "Moscow" and "Washington DC" are the respective values that will be written to the columns.
An example of setting up the value using the Calculate a value option
This is how the result would look like.
The new data was written to the Excel file
The Save the previous step result can be used with the activities that return the contents of a table. For example, here we read a table and write its contents to the Excel file as shown in the example above.
Such a scheme can be used to copy the contents of one table to another. The Save the previous step result can be used in such cases
Note. This activity adds information to Excel without formatting.