Create Excel file Version 6 (.Net)
Action group: Excel
Description
The action creates a new Excel file
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Document name | The 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 | |
Folder | The path to the folder where the document will be saved | Robin.FolderPath | C:\doc\img | Yes |
Overwrite | Boolean 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.Boolean | true | No |
Results | ||||
Path to file | Full 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
- 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.