Hi Team,
I have to delete last month data with Date in “Date_Closed” column
Input:
Note: I have to delete last month rows and update in same sheet (without take any other sheet to write output data)
anyone please
Thanks
Shaik
Hi Team,
I have to delete last month data with Date in “Date_Closed” column
Input:
Note: I have to delete last month rows and update in same sheet (without take any other sheet to write output data)
anyone please
Thanks
Shaik
Hi,
Excel Application Scope
activityRead Range
activity to read the data into a DataTable
(e.g., dtData
).FirstDateLastMonth = New DateTime(Now.Year, Now.Month, 1).AddMonths(-1)
LastDateLastMonth = FirstDateLastMonth.AddMonths(1).AddDays(-1)
dtData = dtData.AsEnumerable().
Where(Function(row) DateTime.ParseExact(row("Date_Closed").ToString(), "dd-MMM-yyyy", System.Globalization.CultureInfo.InvariantCulture) < FirstDateLastMonth OrElse DateTime.ParseExact(row("Date_Closed").ToString(), "dd-MMM-yyyy", System.Globalization.CultureInfo.InvariantCulture) > LastDateLastMonth).
CopyToDataTable()
Regards,
Gokul
If Excel is installed on the machine follow this approach.
Excel Process Scope
activityFilter
to filter the data of last month.Delete Rows
activity - Configure property What to delete
= All visible rows
Filter
activity and configure Clear any existing filter
to clear the filter@ashokkarale I have followed same steps not deleted any rows from sheet
please help
Any error or which steps are running fine?
It’s my mistake, now your steps are working fine
Thanks
Shaik
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.