Excel Report for each month

Excel Report for each month

Question: A user needs to download a report for each month of the year and decides to loop over the months using a “For Each” activity. Which datatype is best-suited to hold the values of the names of the months?

  •   String
  •   List(Of String)
  •   GenericValue
  •   String[] – Array for String


Option B is correct.

The correct answer is B. For Each loops path of least resistance is to use a List of a specific type argument. In this case String. With strings you would have to use the string manipulation functions and Arrays are best suited for While and Do While loops.

Please subscribe to Cameron's YouTube channel