How to read Multiple input files

Hii,
My requirement is like i have one excel input file and 1 .mht input file which i need to scrapped it and store it into a datatable.Then i need to Compare the Columns of Each input file. But the requirement is like sometimes we can get two .mht files also sometimes three .mht files also. So for one excel file we can have any number of .mht file and we need to compare the excel file column with all these number of .mht files.

So, I m not getting how i will automate this through RPA.
What if number of input file increase in future.

Please helpp!!
I am on my project

Hi @Doonline ,

I Assume that files are in some Folder say targetDirectory

  1. Take an assign activity and create a variable of type Array of String - Lets call this Excelfiles and use the below expression to get all the Excel Files - You can have a more specific Filter like excelName instead of *

string Excelfiles = Directory.GetFiles(targetDirectory, “-.xlsx”);

This will give you all the Excel available in Folder.

  1. Take an assign activity and create a variable of type Array of String - Lets call this MhtFile and use the below expression to get all the MhtFiles -

string MhtFiles = Directory.GetFiles(targetDirectory, “-.mht”);

This will give you all the mht files available in Folder.

  1. Now MhtFiles.Count will give you the count of mht files in the Folder and can be used in for each to loop.

Thanks
Mukesh

But How it will read these files and how it will store it in a datatable

You Mean reading all the Excel Files one by one and creating a common Datatable.

if Yes - Then we can use an activity called Build DataTable - Create a Blank DataTable and then keep Merging DataTables to it.

No ,I dont want in a common Datatable.I want it in a different datatable.And not only Excel files but .mht files also i want in a datatable