4.1 UiPathExcel of a reading operation

Basic concepts Uipath operation of Excel
UiPath two methods of operation Excel
App Integration> Excel VS System> File > Workbook

4.1 UiPathExcel of a reading operation
Differences in the:
the former operation must be included in Excel Excel application Scope controls which, in this workbook uniform path setting;
the latter workbook written in each individual path inside the control necessary to provide separately;
first set (Excel), it must be open EXCEL, and Excel does not automatically close after the completion of the process;
and when using the second set (workbook), the Excel process does not create the problem of residual EXCEL process does not exist for the workbook continuous operation without frequent open and close the workbook, theoretically run faster;
therefore subsequent to the case using Excel controls are located at the System> File> the workbook;
Excel read operation
to read a cell
control description
read cell: using the read cell controls, read the contents of a cell in Excel
4.1 UiPathExcel of a reading operation
common attributes introduced:
the Input:
cell: cell needs to read the coordinates
SheetName: workbook name to be read
WorkbookPath: need to read Excel file path
Misc:
Private: If selected, the value of the variables and parameters are no longer recorded in the level of detail
Options:
password: password Excel file (Such as no ignoring)
PreserveFormat: If selected, will keep the cell you want to read format
the Output:
the Result: The specified cell information stored in the variable
case notes
Given Excel file "science.xlsx", using the reading Read Cell control cell "B2", and the console output;
Procedure
Step: Read Cell control using the input path to an Excel file, enter the cell to be read "B2", definition of variables cellValue, and the contents of the cell are stored in the variable CellValue;

第二步:使用Log Message控件,输出变量内容;
4.1 UiPathExcel of a reading operation
读取一行
控件介绍
Read Row: 使用Read Row 控件,读取Excel某一行的内容
4.1 UiPathExcel of a reading operation
常用属性介绍:
Input:
SheetName: 需要读取的工作簿名称
StartingCell: 从指定单元格开始的一行中读取值
WorkbookPath: 需要读取的Excel文件路径
Misc:
Private: 如果选中,则变量和参数的值不再记录在详细级别
Options:
Password: Excel 文件密码(如无可忽略)
PreserveFormat: 如果选中,将保留你要读取的单元格的格式
Output:
Result: 将指定单元格的信息存储在IEnumerable<object>变量中
案例说明
给定Excel 文件“science.xlsx“,使用Read Row控件读取从单元格“A1“开始一行的值,并在控制台输出;
操作步骤
第一步:使用Read Row控件,输入Excel文件路径,从单元格“A1“开始读取一行,定义变量rowValue,并将这行单元格内容保存在变量rowValue 中;

4.1 UiPathExcel of a reading operation
Step 2: Use For Each control rowValue traverse the array, the output of the contents of each row of cells;
4.1 UiPathExcel of a reading operation
reading a
control Introduction
Read Column: Read Column control using, read the contents of a column Excel
4.1 UiPathExcel of a reading operation
common attributes described:
the Input:
SheetName: workbook name to be read
StartingCell: starting from a specified cell reads the value
WorkbookPath: need to read Excel file path
Misc:
Private: If the value selected, the variables and parameters are no longer recorded in the level of detail
Options:
password: password Excel file (such as no ignoring)
PreserveFormat: If selected, retains the formatting of the cell that you want to read
the Output:
the Result: will IEnumerable <object> variable specified cell information storage
case notes
to Excel file set "science.xlsx", using the read column control values are read from the cell "A1" of a start, and output in the console;
Procedure
step: read column using control input Excel file path, from the unit grid "A1" starts reading line, columnValue defined variables, and stores the content in the cell line in the variable columnValue
4.1 UiPathExcel of a reading operation

Step 2: Use For Each control columnValue traverse the array, the output of the column, the contents of each cell;

Guess you like

Origin www.cnblogs.com/rpa-/p/11866687.html