CodePudding user response:
This is the code I delete data
# data reduction
Def m_button5OnButtonClick (self, event) :
Self. Sheet=self. The document. The sheets (' 2003 ')
Last_row=self. Sheet. Used_range. Rows. Count
Number=last_row - 2530
For I in range (number) :
Self. Content_delete (' A '+ STR (last_row))
Self. Content_delete (" B "+ STR (last_row))
Self. Content_delete (" C "+ STR (last_row))
Self. Content_delete (" D "+ STR (last_row))
Last_row=last_row - 1
Def content_delete (self, address) :
Self. Sheet. Range (address). The clear ()
CodePudding user response:
Has been resolved!!!!! Delete statements should write
# data reduction
Def m_button5OnButtonClick (self, event) :
Self. Sheet=self. The document. The sheets (' 2003 ')
Last_row=self. Sheet. Used_range. Rows. Count
Number=last_row - 2530
For I in range (number) :
Self. Content_delete (' A '+ STR (last_row))
# self. Content_delete (" B "+ STR (last_row))
# self. Content_delete (" C "+ STR (last_row))
# self. Content_delete (" D "+ STR (last_row))
Last_row=last_row - 1
Def content_delete (self, address) :
Self. Sheet. Range (address). API. EntireRow. Delete ()