I want to get the last date of each month, which includes all its corresponding data, I already read the excel with “excel application scope” and “read range” and then I put a “for each row”, but right in this activity I want to extract the aforementioned data

does anyone know how?

thank you very much

First I would sort that DT in ascending/descending order so all dates are in the proper order.

To find the total number of days in a given month Month, DateTime.DaysInMonth(int year, int month)

Update…

Try something like the below.

Note: This is just for the month of January

@Jarzzz

If I do that, I can get the result that I mentioned earlier

thank you very much in passing

Sorry you lost me with “I want to extract the aforementioned data”

What are you trying to accomplish here?

So I want the result excel to come out, after the process the last dates of each month that appear in the previous excel

I just don’t know how to do that?

and that’s why I asked you, if those processes are what I have to do to get it that way

note: that excel that I am showing I did it manually but that I want to be my result

So if I understand correctly what you are looking to do is…

Read an Excel Sheet, find the last day of the month, if found, write that last day row to a new Excel Sheet?

Update…

```
In your logic statement of the For Each Row activity
If Row is the last day of the month
Add Data Row - {Row.Item(0), Row.Item(1).... Row.Item(6)} to DT_Final
Excel Application Scope
Write Range
DT_Final
```