nerdexam
Microsoft

PL-500 · Question #27

You are developing a desktop flow that reads data from a table in a Microsoft Excel workbook. You need to read the cell in the fourth row and first column of the table. Which two expressions can you…

The correct answer is B. %ExcelData[4][0]% D. %ExcelData[4]['Column1']%. In Power Automate Desktop, to access a specific cell in an Excel data table, you can use zero-based indexing for both rows and columns or combine the zero-based row index with the column header name.

Develop automations

Question

You are developing a desktop flow that reads data from a table in a Microsoft Excel workbook. You need to read the cell in the fourth row and first column of the table. Which two expressions can you use? Each correct answer presents a complete solution. NOTE: Each correct answer is worth one point.

Options

  • A%ExcelData[1][4]%
  • B%ExcelData[4][0]%
  • C%ExcelData['Column1'][4]%
  • D%ExcelData[4]['Column1']%

How the community answered

(46 responses)
  • A
    7% (3)
  • B
    76% (35)
  • C
    17% (8)

Why each option

In Power Automate Desktop, to access a specific cell in an Excel data table, you can use zero-based indexing for both rows and columns or combine the zero-based row index with the column header name.

A%ExcelData[1][4]%

The expression %ExcelData[1][4]% would refer to the second row (index 1) and the fifth column (index 4), not the fourth row and first column.

B%ExcelData[4][0]%Correct

Power Automate Desktop uses zero-based indexing for data tables; therefore, to access the fourth row (index 4) and the first column (index 0), the correct expression is %ExcelData[4][0]%.

C%ExcelData['Column1'][4]%

The expression %ExcelData['Column1'][4]% is incorrect because the column name should be the second index, specifying the column, while the first index should always be the row number.

D%ExcelData[4]['Column1']%Correct

Alternatively, you can access a cell by combining the zero-based row index with the column's header name; thus, %ExcelData[4]['Column1']% correctly references the fourth row under 'Column1'.

Concept tested: Power Automate Desktop Excel data table indexing

Source: https://learn.microsoft.com/en-us/power-automate/desktop-flows/variables-notation

Topics

#Power Automate Desktop#Excel Automation#Data Table Indexing#Expressions

Community Discussion

No community discussion yet for this question.

Full PL-500 Practice