Reading a list of Excels

datatable
excel
activities

#1

Hi All,

I have a sequence that can read ranges from an excel and then store it as a Data Table, I do all these under the ‘Excel Scope Application’ but I specify the filename and sheetname.

How can I automate the sequence to operate on the following scenarios:

I need this sequence to work on all the excel sheets in a particular local folder, the excel sheets can fall under the 2 below:

  1. Folder contains multiple excel files with different names - but consistent sheet names
  2. Folder contains multiple excel files with different names - but different sheet names

Thanks


#2

If multiple data tables, for this you need to create Datatable variables on fly.(may be I overthought and there is a simple solution)

Read the files from Directory

Create a Datatable list

In foreach file
Count = 1

Add new datatable to the list Pass with Tablename varible based on count/filename)

Assign it to read range

Count = count+1

Now think of Sheetname in this fashion.