UiPath UiADPv1 Practice Test Questions and Exam Dumps Part19 Q361-380

View Full UiPath UiADPv1 Exam Dumps and Practice Test Dumps.

 

Question 361

Which activity creates a new Excel worksheet?

  1. Read Row
  2. Add Sheet
  3. Read Cell
  4. Copy Range

Correct Answer: 2

Explanation

Add Sheet creates a new worksheet within an Excel workbook. It is useful when an automation needs to generate a report section, create a new processing area, or prepare a worksheet for newly generated information. Read Row retrieves existing spreadsheet data, Read Cell reads one cell, and Copy Range duplicates spreadsheet content. Adding a worksheet can be performed dynamically when the required sheet name or reporting structure is determined during execution. Developers should also ensure that the requested worksheet name does not conflict with existing workbook naming requirements.

Question 362

Which activity deletes an Excel worksheet?

  1. Delete Sheet
  2. Add Sheet
  3. Read Range
  4. Write Cell

Correct Answer: 1

Explanation

Delete Sheet removes a selected worksheet from an Excel workbook. It can be useful when temporary sheets are no longer required or when an automation must clean up a workbook before delivering a final report. Add Sheet creates a worksheet, Read Range retrieves spreadsheet data, and Write Cell changes the value of an individual cell. Because deleting a sheet can permanently remove its information from the workbook, the automation should identify the correct worksheet before performing the operation.

Question 363

What does the Read Range activity return?

  1. A DataTable
  2. A Boolean
  3. A Queue
  4. A file path

Correct Answer: 1

Explanation

Read Range reads a specified spreadsheet range and normally returns the retrieved tabular information as a DataTable. This allows the workflow to process spreadsheet records using DataTable operations such as filtering, iteration, validation, and calculations. A Boolean is used for true or false values, a Queue stores ordered items, and a file path identifies a file location. Read Range is therefore particularly useful when an automation needs to move spreadsheet information into memory for structured processing.

Question 364

Which activity writes a DataTable to an Excel worksheet?

  1. Read Range
  2. Write Range
  3. Read Cell
  4. Get Text

Correct Answer: 2

Explanation

Write Range writes tabular data, such as a DataTable, into a specified spreadsheet range. It is commonly used for creating reports, exporting processed records, or updating workbook data in bulk. Read Range performs the opposite direction of data movement by retrieving spreadsheet information into a DataTable. Read Cell retrieves one cell, while Get Text obtains text from a UI element. Write Range is useful when a workflow has already processed data in memory and needs to place the resulting dataset into an Excel worksheet.

Question 365

Which activity writes a single value into a spreadsheet cell?

  1. Write Cell
  2. Read Range
  3. Add Sheet
  4. Read Column

Correct Answer: 1

Explanation

Write Cell writes a specified value into one spreadsheet cell. It is suitable when an automation needs to update an individual field, such as a report title, status, date, or calculated result. Read Range retrieves a larger tabular area, Add Sheet creates a worksheet, and Read Column retrieves column data. Using Write Cell for targeted updates avoids the need to rewrite an entire range when only one cell needs modification. The developer should provide the correct worksheet and cell reference.

Question 366

Which activity adds new data after the existing contents of a range?

  1. Append Range
  2. Read Row
  3. Delete Sheet
  4. Get Text

Correct Answer: 1

Explanation

Append Range adds new tabular information after the existing data in a spreadsheet range. This is useful when an automation repeatedly produces records and needs to add each new batch below previously written information without replacing it. Read Row retrieves information, Delete Sheet removes a worksheet, and Get Text extracts text from a UI element. Append operations are particularly useful for building logs and reports over time, although the workflow should ensure that the destination structure and columns remain compatible with the appended data.

Question 367

Which method returns a value’s position within a collection or string?

  1. Replace
  2. IndexOf
  3. Trim
  4. Join

Correct Answer: 2

Explanation

IndexOf returns the position at which a specified value or substring occurs within a supported string or collection. It can help workflows locate data before applying another operation, such as extracting part of a string or determining whether a value appears at a particular position. Replace changes matching text, Trim removes surrounding whitespace, and Join combines multiple strings. When using IndexOf, developers should account for the result when no matching value exists so that later operations do not use an invalid position.

Question 368

Which method removes a specified substring and replaces it with another value?

  1. Split
  2. Replace
  3. Contains
  4. EndsWith

Correct Answer: 2

Explanation

Replace searches for a specified substring and substitutes it with another value. It is useful for cleaning text, standardizing labels, removing unwanted characters, or transforming imported information before further processing. Split divides a string into separate parts, Contains checks whether a value exists, and EndsWith tests the ending of a string. Replace can be applied repeatedly when several text transformations are required, but developers should make sure the replacement pattern is specific enough to avoid unintentionally changing valid portions of the original text.

Question 369

What does String.Split primarily do?

  1. Combines strings
  2. Separates a string into parts
  3. Sorts a collection
  4. Removes a file

Correct Answer: 2

Explanation

String.Split divides a string into multiple parts using one or more specified delimiters. For example, an automation can split a comma-separated value into individual elements for separate processing. Combining strings is handled by operations such as Join or concatenation, sorting belongs to collection operations, and file deletion is unrelated. Split is especially useful when external data arrives as delimited text and each component needs to be validated, transformed, or stored separately before the automation continues.

Question 370

Which activity reads text from a file?

  1. Write Text File
  2. Read Text File
  3. Write Cell
  4. Add Data Row

Correct Answer: 2

Explanation

Read Text File retrieves the contents of a text file and makes the resulting string available to the workflow. It is useful for reading configuration fragments, logs, plain-text data, or other file-based information that does not require a structured spreadsheet format. Write Text File creates or updates text content, Write Cell modifies a spreadsheet, and Add Data Row changes a DataTable. Before reading, the workflow should ensure that the expected file exists and that the automation has appropriate access to it.

Question 371

Which activity creates or updates a plain-text file?

  1. Read Text File
  2. Write Text File
  3. Read Row
  4. Get File Info

Correct Answer: 2

Explanation

Write Text File writes specified text to a file. It can be used to generate logs, export simple results, create text-based configuration information, or save processed content for another system. Read Text File retrieves existing text, Read Row works with spreadsheet data, and Get File Info retrieves metadata rather than writing content. When using Write Text File, the developer should select the correct path and understand whether the operation should create a new file or overwrite existing content according to the activity’s configured behavior.

Question 372

Which activity retrieves information such as a file’s size or timestamps?

  1. Get File Info
  2. Write Text File
  3. Add Sheet
  4. Read Cell

Correct Answer: 1

Explanation

Get File Info retrieves metadata associated with a file, which can include information such as its size, creation time, modification time, or other available file properties. This is useful when an automation needs to validate files before processing or record metadata for auditing. Write Text File changes file content, Add Sheet modifies a workbook, and Read Cell retrieves spreadsheet information. File metadata can help an automation make decisions without opening and reading the entire file.

Question 373

Which activity moves a file to another location?

  1. Copy File
  2. Move File
  3. Delete File
  4. Get File Info

Correct Answer: 2

Explanation

Move File transfers a file from one location to another. The operation is useful when an automation needs to place processed files into an archive, move incoming documents into a working folder, or organize files after successful processing. Copy File creates another copy while leaving the original in place, Delete File removes the file, and Get File Info only retrieves metadata. Moving files can support clear folder-based processing stages, such as separating newly received, processed, and archived documents.

Question 374

Which activity creates a duplicate of an existing file?

  1. Move File
  2. Delete File
  3. Copy File
  4. Read Text File

Correct Answer: 3

Explanation

Copy File creates a duplicate of an existing file at a specified destination while preserving the source file. This is useful when an automation needs to create a backup, place the same document in another folder, or provide a working copy for further processing. Move File changes the file’s location, Delete File removes it, and Read Text File retrieves textual content. Copying should be used when the original must remain available after the operation, especially when preserving source documents is an important business requirement.

Question 375

Which activity removes a file from storage?

  1. Delete File
  2. Copy File
  3. Move File
  4. Read File

Correct Answer: 1

Explanation

Delete File removes a specified file from the file system. It can be useful for cleaning temporary files or removing documents after successful processing when business requirements permit deletion. Copy File preserves the original while creating another copy, and Move File transfers the original to another location. Before deleting a file, the workflow should verify that the correct path and file have been selected because deletion can remove information that may not be recoverable through the automation itself.

Question 376

Which expression checks whether a file exists before processing it?

  1. File.Exists
  2. File.Create
  3. File.Delete
  4. File.Move

Correct Answer: 1

Explanation

File.Exists checks whether a file is present at a specified path and returns a Boolean result. It is useful as a validation step before reading, moving, deleting, or otherwise processing a file. File.Create creates a file, File.Delete removes one, and File.Move transfers it to another location. Checking existence can prevent avoidable errors when an expected input file is missing and allows the workflow to branch into an appropriate handling path, such as logging the missing document or skipping the transaction.

Question 377

Which method combines folder and file names into a valid path?

  1. Path.Combine
  2. Path.Split
  3. Path.Sort
  4. Path.Clear

Correct Answer: 1

Explanation

Path.Combine combines directory and file components into a path while handling the appropriate path separator for the operating system. It is generally safer and clearer than manually concatenating path strings because it reduces errors involving missing or duplicated separators. Path.Split, Path.Sort, and Path.Clear are not the standard methods used for constructing file paths. Path.Combine is especially useful when folders and filenames are stored separately in variables or configuration values and must be assembled dynamically during execution.

Question 378

A workflow needs to create a directory only when it does not already exist. Which approach is appropriate?

  1. Check the directory and create it when missing
  2. Delete the directory first
  3. Rename every file
  4. Restart the process

Correct Answer: 1

Explanation

Checking whether the required directory exists and creating it when necessary provides a controlled way to prepare the file system for processing. This prevents unnecessary creation attempts and helps the workflow handle both first-time and repeated executions. Deleting the directory could remove existing information, renaming files does not create the required location, and restarting the process does not address the directory requirement. Directory preparation is particularly useful for automated reports, archives, temporary files, and other outputs that require predictable folder structures.

Question 379

Which data type is most appropriate for storing monetary values that require decimal precision?

  1. Boolean
  2. Integer
  3. Decimal
  4. String

Correct Answer: 3

Explanation

Decimal is appropriate for monetary values that require decimal precision. It is designed for financial calculations where maintaining accurate decimal representation is important. Boolean stores true or false values, Integer stores whole numbers, and String stores text. Choosing the correct numeric type helps prevent unnecessary conversions and supports clearer calculations. When processing financial information, developers should also apply appropriate rounding and business rules rather than relying on implicit conversions between text and numeric types.

Question 380

Which operation rounds a numeric value to a specified number of decimal places?

  1. String.Split
  2. Math.Round
  3. DateTime.Add
  4. File.Exists

Correct Answer: 2

Explanation

Math.Round rounds a numeric value according to the specified precision and applicable rounding behavior. It is useful when an automation needs to format calculated amounts or apply a business rule requiring a particular number of decimal places. String.Split processes text, DateTime.Add changes a date or time value, and File.Exists checks file availability. Developers should consider the required rounding rule when working with financial or reporting data because different rounding requirements can produce different final results.