Create Excel file Version 6 (.Net)

Action group: Excel 


Description

The action creates a new Excel file

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
Document nameThe name of the new document to be created. The action creates a file with the standard Excel extension (xls or xlsx), which is relevant for the PC running the studio.Robin.String
Yes
FolderThe path to the folder where the document will be savedRobin.FolderPathC:\doc\imgYes
OverwriteBoolean variable, optional parameter. The default is false. If the value of the parameter is True and a file with the same name already exists in the folder, then the existing file will be overwritten. If the value of the parameter is False and a file with the same name already exists in the folder, a warning will be issued: «A file with the same name already exists» and the file will not be added to the folder. And if there is no file with the same name in the folder and the parameter value is False, then the specified file will be added to the specified folder.Robin.BooleantrueNo
Results
Path to fileFull path to the created file.Robin.FilePath

Special conditions of use

If the file name is specified with an extension in the "Document name" field, the part of the text specified before the extension is written to the parameter.

Example: "Test.xlsx", "Test" will be written into the "Document name" parameter.

The user will be able to save in a specific extension later with the "Save as" action.

Example of use

Task

Create an Excel-document with the set name in the specified folder. Also insert values of the collection to column A (see Create a collection).

Solution

Create an Excel-document. Use the "Create Excel file", "Open", "Set column data", "Save", "Close" actions.

Implementation

  1. Assemble a robot scheme with the actions.

 Set the "Create Excel file" action parameters.

2. Set the "Open" action parameters.

3. Set the "Set column data" action parameters.

4. Set the "Save" action parameters.

5. Set the "Close" action parameters.

6. Click "Start" and see the result.

Result


The Excel file was created successfully.

And data was also added to column A.

  • Нет меток