Question Clear content of cells in Excel after export from DGV

Rabi

Member
Joined
Mar 22, 2022
Messages
17
Programming Experience
Beginner
I tried this line to clear all the data in column 'd' of worksheet in excel after export the data from DGV. Is there a professional way instead of this way ?because I limited the cells in columns by 5000
Worksheet.get_range("d1","d5000").Cells.Clear();
 
C#:
Worksheet.Columns["D"].Delete();
 
There is no 'Delete' method
 

Attachments

  • 20220328_220744.jpg
    20220328_220744.jpg
    163.1 KB · Views: 10
  • 20220328_220744.jpg
    20220328_220744.jpg
    163.1 KB · Views: 9
Darn it. Another property that returns an object instead of the appropriate type. Sorry that doesn't work.
 
Back
Top Bottom