How to read specific data from a excel file which is placed in a folder and folder contains 30 excel files

Here is the sample workflow which will read data from your sample file and copy required data in new file with separated columns -

sample2.xlsx (9.6 KB)
Main.xaml (14.0 KB)
Result.xlsx (8.2 KB)

1 Like

@PrankurJoshi
That’s ok.
I am also getting the output like this,
Now my output is to get Sorting order for store number and as store wise and to write data into separate files by date wise which is shown in excel file as(L0628,L0629,L0630) each date has to be write into separate excel file.(this is to be done dynamically).
All the excel files are in a folder.

1 Like

Sorting is there but what is the date? And if there are 50 filtered records you want to have 50 excels for those? I am not able to understand flow after sorting

1 Like

@PrankurJoshi
After sorting,In that excel file(C ID L0628,L0629,L0630 represents date).Ineed to write data related to L0628 into excel file,data related to L0629 into another excel file and data related to L0630 into another excel file.
It has to be done dynamiccaly because in sample excel files, i have given only 2 files(there are no of files with multiple dates).i have to check each file which contains that dates.If it contains that date,then it has to be write into excel file related to that date.

1 Like

@PrankurJoshi
Hi Prankur Joshi,
Did u get my point.

1 Like

Got it

1 Like

@PrankurJoshi
Ok Prankur Joshi,
Please help on this.

1 Like

Attached is the required workflow with result file

Main.xaml (21.8 KB)

Date_L0629.xlsx (7.5 KB)
Date_L0630.xlsx (7.6 KB)
Date_L0628.xlsx (7.5 KB)

Hope this is what you need

3 Likes

@PrankurJoshi
Hi,
Here u are reading only the single file, but there are multiple files in a folder, each file has different dates.New folder (7).zip (13.3 KB)
As shown in the folder,i have multiple files like that in a single folder.
Now i have to check the folder and each file in that folder, and to write the data corresponding to that date into that date excel file.

1 Like

If you remember in the early conversation we worked on Directory.GetFiles and read every file in a given folder, you have to apply this in that thats it

1 Like

@PrankurJoshi
Ok
And in the output file,we are missing Store’no #01 like that.
Instead of this we are getting (1,2,3,4 in sorting order,i need store number before that ).

1 Like

I removed it to perform sorting, you can add a prefix for the same

1 Like

@PrankurJoshi
Hi,
There is only 10 records for L0630 in sample2 excel file,it is writing 16 records into new excel file named as"Date_L0630".

1 Like

@PrankurJoshi
Hi,
Is it possible to split L0628 from this data(C ID L0628 2646464235634) and write into separate column.

1 Like

Yes you can do it by String.Split("Character by which you wanna split"c) this will give you an array

3 Likes

@PrankurJoshi
Can u please do it for my above sample file.

1 Like

It is there in the workflow I attached

image

ID should be your string like C ID L0628 2646464235634

2 Likes

@PrankurJoshi
Yes from that entire column which contains data like that,i need only the characters L0628(or any date which is in that place,that is it may be L0628,L0629,L0630,L0701 or anything else) into separate column.

1 Like

you can access that value by writing the index arrayDate(2) this will give you L0628 rom C ID L0628 2646464235634

2 Likes

@PrankurJoshi
I need all the data in that entire column which contains data like that(it may be L0628 or L0629 or L0630 or L0725 or L0725 any thing in that place,i need only that type of data to write into another column),not only for particular row.

1 Like