Skip to content
Discussion options

You must be logged in to vote

Try this approach.

    def recive_btn(self, e):

        # data = self.my_table.rows[0].cells
        # print(data)

        save = []
        for r in self.my_table.rows:
            j = []
            data = r.cells
            j.append(data[2]._DataCell__content.value)
            j.append(data[1]._DataCell__content.value)
            j.append(data[0]._DataCell__content.value)
            save.append(j)
        print(save)  # [['6', 'aa', 'bb'], ['3', 'nn', 'zz']]

Use dir() to get the attributes of the object you want to explore.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Rezamoghadam8810
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
2 participants