I want to remove the excel rows completely for which the STATUS column has some particular values. I have achieved usin g a seperate datatable and then writing it back to another sheet, but would like your inputs if possivble by .net code which I can use in Invoke Code activity.
Thank you for the solution but I want it through a C# code or .net code , this way I have implemented but in this have to write into another sheet, but I want it in same sheet
But before writing this to a excel with write range make sure that you have deleted the already records and then write on top of it
Else what will happen if the new datatable has less records and if being passed to write range activity, though it overwrites the extra records will be still there
So delete the records first and then write the data
For that use a INSERT/DELETE ROWS activity and pass
Noofrows - dt.Rows.Count+2
Position - 0
Then use a write range activity with dt and add headers property enabled
I have used this way but lil slow as my data is huge, I have a code to delete the excel sheet as below:
**Dim xlApp As Microsoft.Office.Interop.Excel.Application
Dim wb As Microsoft.Office.Interop.Excel.Workbook
xlApp = New Microsoft.Office.Interop.Excel.Application
wb = xlApp.Workbooks.Open(filepath)
Something similar to this code can I have with If condition and all to remove the rows directly from the excel sheet which meets the STATUS column conditions