File Splitter
This activity helps you to automate the task of splitting two or more files of same file type. The supported file types are PDF (up to version 1.6), MS Word (doc, doxc, docm) and MS Excel (xlsx, xls, xlsm).
Word and PDF files can be split based on the specified range of page numbers while an Excel file can be split based on the specified sheet name or number of rows.
The page range must be in the num-num format. For example, page range from 13 to 51 must be specified as 13-51. Any other format of page range displays an error during process execution.
The sheet name must be provided as semi-comma separated values. For example, Sheet1;Sheet3, without any spaces between the names. The sheet names are case sensitive.
Using File Splitter Activity
- In the Canvas Tools pane, click File to expand the tool and view the associated activities.
- Drag the File Splitter activity and drop on to the Flowchart designer on the Canvas. The validation error symbol disappears when required inputs are provided.
- In the FileType list, select the type of files that you want to split. Available options are:
- word
- excel-sheetwise
- excel-rowwise
For pdf, word or excel-sheetwise FileType
- In the InputFile Path list, select the parameter holding the document file path along with the file name and its extension, for example, D:/documents/sample_doc.docx . You must define the parameters in the Parameter bar to store the value and make it available for the selection.
- In the Page Range or SheetNames list, select the parameter holding the page numbers of the word/pdf file and sheet name if the file is an excel. You must define the parameters in the Parameter bar to store the value and make it available for the selection.
- In the Output File Path list, select a parameter holding the output document file path along with the file name of the split file.
For excel-rowwise FileType
- In the InputFile Path list, select the parameter holding the document file path along with the file name and its extension. For example, D:/documents/sample_doc.docx . You must define the parameters in the Parameter bar to store the value and make it available for the selection.
- In the Sheet Name list, select the parameter holding the name of the sheet. The sheet name must be a single sheet name and not multiple sheets. You must define the parameters in the Parameter bar to store the value and make it available for the selection.
- In the Output Folder Path list, select the parameter holding the folder name to save the files after row wise split. You must define the parameters in the Parameter bar to store the value and make it available for the selection. The default value is set as 1.
- In the Header row number list, select the parameter holding the number at which header column is present. The rows after the header row is used for splitting. You must define the parameters in the Parameter bar to store the value and make it available for the selection.
- In the Split By list, select the option by which you want to perform the split. You can split the file based on the Number of Rows or Number of Files specified.
- In the Number of files to split into/Number of rows to split into list, select the parameter holding the number of files or number of rows you want to split the file into. You must define the parameters in the Parameter bar to store the value and make it available for the selection.
- Select the Remove styles check box if you want to remove styles applied to the content of the file to simplify the data for splitting.
- Select the Overwrite File? check box to overwrite an existing file if you want to create the merged file with the name of an existing file.
- Click the Result Mapping link. The Output Mapping list appears. Select the available parameter to map the status of the file operation performed. Both Boolean and String type is supported. You must pre-define the parameter to make it available for the selection. If the operation is successful, it returns true and if the operation fails it returns false. It can be used as an input for the next action that you want to perform in the automation process workflow, depending upon the success or failure of the file operation performed.
The File Splitter activity with a default name is created.
File Splitter Properties
The properties of File Splitter activity are listed in the following table and can be edited in the Properties grid on the right pane.
Property Name |
Usage |
Control Execution |
|
Ignore Error |
When this option is set to Yes, the application ignores any error while executing the activity. If set to NA, it bypasses the exception (if any) to let the automation flow continue; however, it marks the automation status as failure, in case of an exception. By default, this option is set to No. |
Delay |
|
Wait After |
Specify the time delay that must occur after the activity is executed. The value must be in milliseconds. |
Wait Before |
Specify the time delay that must occur before the activity is executed. The value must be in milliseconds. |
Misc |
|
AllowedNumerOfFoldersToBeCreatedAlternatively |
Number of folder levels limit that can be created to place the output file . By default, the value is set to 2. It is recommended to keep the folder level limit less than 5. |
Breakpoint |
Select this option to mark this activity as a pause point while debugging the process. At this point, the process freezes during execution allowing you to examine if the process is functioning as expected. In large or complex processes, breakpoints help in identifying the error, if any. |
Commented |
Select this option to mark this activity as inactive in the entire process. When an activity is commented, it is ignored during the process execution. |
DisplayName |
The display name of the activity in the flowchart designer area. By default, the name is set as File Splitter. You can change the name as required. |
HeaderRowNumber |
The number at which header column is present. The rows after the header row is used for splitting. |
NumOfFiles |
The number of files you want to split the excel file into. |
NumOfRows |
The number of rows you want to split the excel file into. |
NumParameter |
The number of rows to split the excel row wise. |
OutFolderPath |
The folder name to save the files after row wise excel file split. |
PasteAsValues |
Paste value or paste the formatted values while splitting the excel row-wise. |
RowsOrFiles |
Signifies if you want to split the excel file row wise or file wise. |
SheetToSplitRowWise |
Signifies if you want to split the excel file sheet wise or row wise. |