Reading Sheet similar Sheet names

I am reading excel sheets based on the naming convention of dates. They are all supposed to be in this format “MM-dd-yyyy” but sometimes they are submitted without leading zeros for single digit months/days ie: (“M-dd-yyyy” or “MM-d-yyyy” or “M-d-yyyy”)

How would I best handle these input errors so that the program also reads these correctly and does not skip over it?

Example: reading 3 sheets named the following and i want to make sure all are read
Sheet 1: 01-09-2020
Sheet 2: 1-09-2020
Sheet 3: 1-9-2020

Do you want to always read all sheets or do you care about their names? You can read them all like this:

  1. In excel app scope, output in a variable of Workbook
  2. Create and assign a variable ( system.collections.generic.IEnumerable(of string)) to store the sheet names like this: MySheets = MyWorkBook.GetSheets
  3. In For Each activity (type object)
  4. inside loop use Read Range and give the Sheet property as item.ToString

@bcorrea thanks, but no there are a lot of other sheets with previous dates on them I do not want to read

so inside of the loop, put a IF condition to only read the ones you need…

Yes, but the problem is I don’t know the exact format when using the read activity you need the sheet name and the name input can vary slightly which is what I am trying to account for