I want to dyanmically delete data of the columns B and C in of the Above Excel
My Data that means my Numbers of Rows are not constant everytime sometimes there are 10 rows sometimes 5 and it varies How DO I achieve this
I tried using Delete Range but somehow it fails Because it that we have to Specify the Cell Number also which I can’t in my case because my Data i.e number of Rows is not constant
in such cases we can read in the excel into a datatable and dynamicly calculate the ranges e.g. YourDataTableVar.Rows.Count
for deletion the cells in excel we do have several options. One approach is to create a 1 column Datatable with X rows and empty values then write it back to the excel (with the range e.g. B2 for a B column deletion) and delete the column values. Do not missout to handle the first row properly when the first row is containing the column header