It seems like there is no such column named under 12 in your excel
Is it so
Cheers @Abubakkar
Thanks @Palaniyappan.
it’s working fine now. condition also working. now I can compare today’s date with excel column date. but I can’t delete further excel column name
No buddy. how can I increment col_index variable?
Fine
Either mention the column name or column index and if we mention both we will be getting this error
Cheers @Abubakkar
with this condition @Palaniyappan
if today’s date (12) and excel column name date (12) is same then i should delete columns with today from end of the month till.
Then assign the value of col_index as Cint(dt.Columns(dt.Columns.Count).ColumnName). Assuming that the columnName has only number as header and if so define this in the variable panel as default value for col_index variable
And try to delete from the last column to till date in reverse order
So the condition be like this in while loop
Cint(dt.Columns(dt.Columns.Count).ColumnName) > Cint(Now.ToString(“dd”))
Cheers @Abubakkar
It should be like count -1
And same in the below condition as well